key-state: make nr-pressed-keys check more accurate

...to avoid counting keys which never send release events and thus
disable all keybinds.

We do not want to match keybinds if additional 'normal' (non-modifiers)
are pressed at the samet time. We must ignore keys which do not send
release events such as XKB_KEY_ISO_Next_Group and XKB_KEY_XF86WakeUP.

Issue #1208
This commit is contained in:
Johan Malm 2023-10-29 22:14:48 +00:00
parent 7b644b3b94
commit ce8420d978
3 changed files with 35 additions and 5 deletions

View file

@ -21,6 +21,6 @@ void key_state_store_pressed_keys_as_bound(void);
bool key_state_corresponding_press_event_was_bound(uint32_t keycode);
void key_state_bound_key_remove(uint32_t keycode);
int key_state_nr_bound_keys(void);
int key_state_nr_pressed_keys(void);
bool key_state_multiple_normal_keys_pressed(void);
#endif /* LABWC_KEY_STATE_H */