Index: hw/xfree86/input/keyboard/kbd.c =================================================================== RCS file: /cvs/OpenBSD/XF4/xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v retrieving revision 1.4 diff -u -r1.4 kbd.c --- hw/xfree86/input/keyboard/kbd.c 3 Dec 2004 09:56:42 -0000 1.4 +++ hw/xfree86/input/keyboard/kbd.c 6 Dec 2004 20:29:53 -0000 @@ -372,6 +372,7 @@ } #endif pKbd->SetLeds(pInfo, pKbd->leds); + pKbd->autoRepeat = ctrl->autoRepeat; return (Success); } @@ -720,11 +721,14 @@ /* * check for an autorepeat-event */ - if (down) { + if (down && KeyPressed(keycode)) { int num = keycode >> 3; int bit = 1 << (keycode & 7); - if ((keyc->down[num] & bit)) - return; + + if ((pKbd->autoRepeat != AutoRepeatModeOn) || + keyc->modifierMap[keycode] || + !(kbdfeed->ctrl.autoRepeats[num] & bit)) + return; } if (UsePrefix) {