linput

Listen to input events
git clone git://git.akobets.xyz/linput
Log | Files | Refs | README | LICENSE

commit 5ca1bb3f9dd3effadda5840bb7e281708b3f7ddc
parent 97ff7393c6b67b5685e364233df271c370aee539
Author: Artem Kobets <artem@akobets.xyz>
Date:   Sat, 18 Apr 2020 15:04:55 +0300

hotkey match logic fixes

Diffstat:
Mconfig.mk | 2+-
Mlinput.c | 8++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/config.mk b/config.mk @@ -1,4 +1,4 @@ -VERSION = 0.1.1 +VERSION = 0.1.2 PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man diff --git a/linput.c b/linput.c @@ -159,12 +159,12 @@ is_hotkey_active(const struct HotkeyRule *hotkey, int last_key) if (!is_match_hotkey_mod(hotkey)) match = 0; - if (!is_mod(last_key)) { + if (!is_mod(last_key)) if (!has_key(hotkey, last_key)) match = 0; - if (!is_match_hotkey_event(hotkey, last_key)) - match = 0; - } + + if (!is_match_hotkey_event(hotkey, last_key)) + match = 0; for (k = 1; match && k < LENGTH(key_state); k++) { if (k == last_key || is_mod(k))