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, or XkbUseCoreKbd if 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:

  1. timeout β€” the delay after the initial press of an auto-repeating key and the first generated repeat event.
  2. 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, XkbGetAutoRepeatRate returns False. Vibe check failed, no data for you πŸ’€

⭐ RETURN VALUES ⭐

  • True β€” the XkbGetAutoRepeatRate function returns True if a compatible version of the Xkb extension is available in the server. Slay βœ…
  • False β€” the XkbGetAutoRepeatRate function returns False if 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