summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hald/linux/addons/addon-input.c6
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],