aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-26 14:12:03 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-26 14:12:03 +0100
commitdea439358888791264ed81124c8fe144b2f8187e (patch)
tree5594b7dcb0b89284fb4ac487234c5df46129cf01
parent269d55d7eb9db3b4c48fbda52e1320372751432a (diff)
Revert global hotkeys change, ignore mice again
-rw-r--r--tools/gsr-global-hotkeys/keyboard_event.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gsr-global-hotkeys/keyboard_event.c b/tools/gsr-global-hotkeys/keyboard_event.c
index ac66324..b9bb231 100644
--- a/tools/gsr-global-hotkeys/keyboard_event.c
+++ b/tools/gsr-global-hotkeys/keyboard_event.c
@@ -293,11 +293,11 @@ static bool keyboard_event_try_add_device_if_keyboard(keyboard_event *self, cons
ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bits)), &key_bits);
const bool supports_key_events = key_bits[KEY_A/8] & (1 << (KEY_A % 8));
- //const bool supports_mouse_events = key_bits[BTN_MOUSE/8] & (1 << (BTN_MOUSE % 8));
+ const bool supports_mouse_events = key_bits[BTN_MOUSE/8] & (1 << (BTN_MOUSE % 8));
//const bool supports_touch_events = key_bits[BTN_TOUCH/8] & (1 << (BTN_TOUCH % 8));
const bool supports_joystick_events = key_bits[BTN_JOYSTICK/8] & (1 << (BTN_JOYSTICK % 8));
const bool supports_wheel_events = key_bits[BTN_WHEEL/8] & (1 << (BTN_WHEEL % 8));
- if(supports_key_events && !supports_joystick_events && !supports_wheel_events) {
+ if(supports_key_events && !supports_mouse_events && !supports_joystick_events && !supports_wheel_events) {
unsigned char *key_states = calloc(1, KEY_STATES_SIZE);
if(key_states && self->num_event_polls < MAX_EVENT_POLLS) {
//fprintf(stderr, "%s (%s) supports key inputs\n", dev_input_filepath, device_name);