Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have defined a custom key type in my xkb configure file to do some redirection (e.g. redirect Ctrl+p to Up etc.) However, I cannot get auto-repeat work for this custom type (neither the original key (e.g. p) or the redirect action (e.g. Up redirected from Ctrl+p) has auto-repeat).

I have tried adding repeat=true, to keysyms configuration according to this from xfree86 mailing list but it doesn't work either.

share|improve this question

There was a patch I stumbled onto within the Chromium OS repository that might help with this; it seems to have been removed after they actually patched it into Chrome itself. Not sure what happened with the QA for the patch or if it was sent upstream or not.

links here: X: Map Alt-Up and Alt-Down to Page Up and Page Down

The patch is as follows:

This is a probably-wrong fix for an issue where autorepeat
is disabled for keys assigned by XKB.  As far as I can tell,
XKB has the correct autorepeat settings for the keys before
a completely-empty autorepeat array from X is copied over
it; then the XKB array is copied back to X.  This makes us
skip the first copy.

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 75e243c..bceb55c 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -342,9 +342,6 @@ CARD8 *         repeat;
     xkb= xkbi->desc;
     repeat= xkb->ctrls->per_key_repeat;

-    if (pXDev->kbdfeed)
-   memcpy(repeat,pXDev->kbdfeed->ctrl.autoRepeats,32);

     if ((pXDev->kbdfeed)&&

I've yet to try it myself, but will probably take a shot at it in a bit.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.