Bug 13873 - addon-input doesn't recognize "repeat" key events
Summary: addon-input doesn't recognize "repeat" key events
Status: RESOLVED DUPLICATE of bug 9767
Alias: None
Product: hal
Classification: Unclassified
Component: hald (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-30 16:11 UTC by Christian Krause
Modified: 2008-01-03 14:00 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Christian Krause 2007-12-30 16:11:46 UTC
my original problem was:
- only the first keypress of the brightness control keys is recognized by gnome-power-manager (and so displayed using the OSD, propagated into the brightness applet etc.) 


I've investigated the problem and found the root cause in hald. Here are the results of my investigations:

- Laptop Dell D610
- brightness of LCD is controlled by the BIOS/chipset using Fn+Up/Down
- interaction of hal and BIOS works so far (using libsmbios)
- re-checked this using the tool dellLcdBrightness from libsmbios-bin package

- but, gnome-power-manager depends on getting the "brightness-down" and "brightness-up" keyboard events from hald (addon-input module) whenever Fn+Up/Down is pressed

- for whatever reason (probably a kernel problem or misbehaving BIOS) the event interface reports only "repeated key presses" after the first key press
- here are the events from /dev/input/evetnx when pressing "Fn+Up" (= brightness up) the first 3 times after the linux has booted
Event: time 1199043187.516618, type 4 (?), code 4 (?), value 133
Event: time 1199043187.516628, type 1 (Key), code 224 (?), value 1
Event: time 1199043187.516632, type 0 (Reset), code 0 (Reset), value 0
Event: time 1199043188.445943, type 4 (?), code 4 (?), value 133
Event: time 1199043188.445953, type 1 (Key), code 224 (?), value 2
Event: time 1199043188.445956, type 0 (Reset), code 0 (Reset), value 0
Event: time 1199043188.931508, type 4 (?), code 4 (?), value 133
Event: time 1199043188.931516, type 1 (Key), code 224 (?), value 2
Event: time 1199043188.931520, type 0 (Reset), code 0 (Reset), value 0

- in short: if I press the key 3 times, the event device will issue:
PRESS (1)
REPEAT (2)
REPEAT (2)
- there is never a RELEASE event sent

- but, in hald/linux/addons/addon-input.c, line 496, the keyevents are only recognized if they have the value 1 (= PRESS):
----------------------------------------------
                } else if (input_data->event.type == EV_KEY && key_name[input_data->event.code] != NULL && input_data->event.value == 1) {
the
----------------------------------------------

To solve the problem, I suggest, that hald-input accepts keyboard input events also if they have a value of 2 (REPEAT). From a highlevel point of view I think this should be OK, because even a repeated key press is a key press. ;-)
Comment 1 Danny Kukawka 2008-01-03 14:00:40 UTC

*** This bug has been marked as a duplicate of bug 9767 ***


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.