From c213b5de89ee4a11d1c6c94b8b142b24885a4323 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 28 Dec 2024 15:29:26 +0100 Subject: Add option to manage program startup directly in the program --- tools/gsr-global-hotkeys/keyboard_event.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/gsr-global-hotkeys') diff --git a/tools/gsr-global-hotkeys/keyboard_event.c b/tools/gsr-global-hotkeys/keyboard_event.c index 954fc7e..ef8f6ef 100644 --- a/tools/gsr-global-hotkeys/keyboard_event.c +++ b/tools/gsr-global-hotkeys/keyboard_event.c @@ -260,6 +260,8 @@ static bool keyboard_event_try_add_device_if_keyboard(keyboard_event *self, cons }; keyboard_event_fetch_update_key_states(self, &self->event_extra_data[self->num_event_polls], fd); + if(self->event_extra_data[self->num_event_polls].num_keys_pressed > 0) + fprintf(stderr, "Info: device not grabbed yet because some keys are still being pressed: /dev/input/event%d\n", dev_input_id); ++self->num_event_polls; return true; -- cgit v1.2.3