XkbGetAutoRepeatRate(3)
π XkbGetAutoRepeatRate β okay so here's the tea
Bestie, we're looking at XkbGetAutoRepeatRate(3) from the XKB functions section of the manual, and honestly? It's giving "small function, big keyboard glow-up." Let's get into it β¨
πΈ NAME πΈ
XkbGetAutoRepeatRate β literally just gets the current attributes of the RepeatKeys control for a keyboard device. That's it. That's the whole job. Iconic, honestly π
β¨ SYNOPSIS β¨
Bool XkbGetAutoRepeatRate (Display *display, unsigned int device_spec,
unsigned int *timeout_rtrn, unsigned int *interval_rtrn);
π¦ ARGUMENTS π¦
displayβ your connection to the X server, the whole reason we're here πdevice_specβ the device ID you actually want, orXkbUseCoreKbdif you're feeling basic (affectionate)timeout_rtrnβ gets backfilled with the initial repeat delay, in ms β±οΈinterval_rtrnβ gets backfilled with the subsequent repeat delay, in ms β±οΈβ±οΈ
π₯ DESCRIPTION π₯
So the core protocol is kind of a flop here ngl β it only lets you control whether the entire keyboard, or individual keys, should auto-repeat when held down. That's it. Binary. Two settings. Groundbreaking π
RepeatKeys is a boolean control that extends that capability by adding control over the delay until a key begins to repeat and the rate at which it repeats. And here's the couple-y part: RepeatKeys is coupled with the core auto-repeat control β when RepeatKeys is enabled or disabled, the core auto-repeat gets enabled or disabled too, and vice versa. They're matching, periodt π
Auto-repeating keys are controlled by two attributes:
timeoutβ the delay after the initial press of an auto-repeating key and the first generated repeat event.intervalβ the delay between all subsequent generated repeat events.
And like with all boolean controls, configuring the attributes that determine how the control operates does not automatically enable the control as a whole. So don't come crying to me when you set everything up and nothing happens, bestie β that's a whole separate step π
XkbGetAutoRepeatRate queries the server for the current values of the RepeatControls control attributes, backfills timeout_rtrn and interval_rtrn with them, and returns True. π«Ά
Heads up though: if a compatible version of the Xkb extension is not available in the server,XkbGetAutoRepeatRatereturnsFalse. Vibe check failed, no data for you π
β RETURN VALUES β
Trueβ theXkbGetAutoRepeatRatefunction returnsTrueif a compatible version of the Xkb extension is available in the server. Slay βFalseβ theXkbGetAutoRepeatRatefunction returnsFalseif a compatible version of the Xkb extension is not available in the server. Tragic β
π§ SEE ALSO π§
There's no SEE ALSO section in this one, so go forth and query your repeat rates in peace, queen π
Okay that's the whole page!! Stay hydrated, read your return values, and remember: X Version 11, libX11 1.8.14 β that's the source and version, brought to you by the XKB FUNCTIONS girlies. Byeeee πππ
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- Copyright (c) 1999, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms