autorepeat

Jeremy Huddleston jeremyhu at apple.com
Tue Feb 24 19:45:37 PST 2009


I'm having trouble turning off autorepeat for some keys in our keymap.

I'm able to set it globally with XkbSetRepeatKeys(pDev, -1,  
AutoRepeatModeOff); or XkbSetRepeatKeys(pDev, -1, AutoRepeatModeOn);,  
but I can't seem to control it for individual keys.

I want to disable key repeats for the left shift key which has keycode  
64.  Doing 'xset -r 64' accomplishes this.  It looks like I'm doing  
the same thing that DoChangeKeyboardControl is doing in dix/devices.c:

     int i = (64 >> 3);
     int mask = (1 << (64 & 7));
     pDev->kbdfeed->ctrl.autoRepeats[64 >> 3] &= ~mask;

     XkbDisableComputedAutoRepeats(pDev, 64);
     XkbSetRepeatKeys(pDev, 64, AutoRepeatModeOff);

but the left shift is still repeating.

Does anyone have an idea what I'm doing wrong?


More information about the xorg-devel mailing list