Bug 23889

Summary: keyboard repeat doesn't work in 1.6.99.900
Product: xorg Reporter: Bernhard Rosenkraenzer <bero>
Component: Server/GeneralAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: daniel, ojab
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 23613    
Attachments:
Description Flags
0001-xkb-drop-key-presses-for-already-repeating-keys.-238.patch none

Description Bernhard Rosenkraenzer 2009-09-12 15:34:59 UTC
After updating to xorg-server 1.6.99.900, keyboard auto repeat stopped working.

xset r on
xset r rate 300 50

don't produce any error messages (or output on the console even with Xorg -verbose 9), but don't enable keyboard repeat either.

Versions of related packages:
xorg-server 1.6.99.900
libXi 1.2.99.4
xf86-input-keyboard 1.3.99.1
xset 1.0.4

Devices are configured manually without hal, the keyboard config is

Section "InputDevice"
        Identifier      "Keyboard0"
        Driver          "kbd"
        Option          "XkbLayout" "ch"
        Option          "XkbModel" "pc105"
        Option          "XkbVariant" "de_nodeadkeys"
EndSection
Comment 1 Bernhard Rosenkraenzer 2009-09-12 15:39:48 UTC
Checking some other rates to "xset r rate x y", I found that after

xset r 200 1000

the behavior changes slightly:

after holding the key for a bit (might be 200 ms), it produces 4 more characters, then stops.

Apparently keyboard repeat does work, but is almost instantly turned off.
It can't be an application acting up; this happens even if Xorg is run as Xorg (without any clients running) and any application (tried konsole, xterm, qtconfig) is running to input stuff into.
Comment 2 ojab 2009-09-13 08:11:09 UTC
I have this issue too, very annoying.
Comment 3 Peter Hutterer 2009-09-13 18:44:32 UTC
verified, happens with the keyboard driver only, not evdev. Events get posted by the driver but disappear somewhere inside XKB.
Comment 4 Peter Hutterer 2009-09-13 19:10:35 UTC
Created attachment 29494 [details] [review]
0001-xkb-drop-key-presses-for-already-repeating-keys.-238.patch

xkb: drop key presses for already repeating keys. (#23889)

The event sequence for continuously pressed keys with the keyboard driver is
PRESS - PRESS - PRESS - ... - RELEASE.
The first press sets the repeatKey to the keycode and the matching timer.
The second press (on the same keycode) can be silently dropped instead of
overwriting the timer again.
Comment 5 Peter Hutterer 2009-09-13 19:59:06 UTC
Pushed as 4650e6ebe6e3ea48a026ace60b25daa165580467. Thanks for reporting.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.