diff options
author | Holger Macht <hmacht@suse.de> | 2010-03-09 12:11:22 +0100 |
---|---|---|
committer | Danny Kukawka <danny.kukawka@web.de> | 2010-03-10 10:18:04 +0100 |
commit | 05b243e5aa70ee413f135eb383f0ad379bfceee2 (patch) | |
tree | 1dbb91ed747bddb365766c859a135c676a758c51 | |
parent | a3ea90ad7c3d17888df173ffec84a4798264d88c (diff) |
fix SLEEP key for some broken BIOSe
Some BIOSe are broken and create infinite key press events for
the sleep key (FN-F5). So ignore all key repeats for the SLEEP
key. (bnc#525959)
-rw-r--r-- | hald/linux/addons/addon-input.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hald/linux/addons/addon-input.c b/hald/linux/addons/addon-input.c index 1d6fcbcf..0c4cbece 100644 --- a/hald/linux/addons/addon-input.c +++ b/hald/linux/addons/addon-input.c @@ -300,6 +300,12 @@ event_io (GIOChannel *channel, GIOCondition condition, gpointer data) } } } else if (input_data->event.type == EV_KEY && key_name[input_data->event.code] != NULL && input_data->event.value) { + /* this is a key repeat and should be ignored for the sleep key */ + if (input_data->event.code == KEY_SLEEP && input_data->event.value == 2) { + HAL_INFO (("key release event for KEY_SLEEP, ignoring")); + return TRUE; + } + libhal_device_emit_condition (ctx, input_data->udi, "ButtonPressed", key_name[input_data->event.code], |