]> git.mdlowis.com Git - proto/labwc.git/commitdiff
keyboard: remove nr_pressed_keys == 1 restriction for keybindings
authorJohn Lindgren <john@jlindgren.net>
Sat, 11 Nov 2023 03:00:04 +0000 (22:00 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 12 Nov 2023 17:37:30 +0000 (17:37 +0000)
This restriction should be unnecessary now (see the previous commit for
details) and caused issues with keybindings not working on some systems
where irregular keypress events are received (e.g. XF86XK_WakeUp)
without an accompanying release event.

Kept separate from the previous commit for the sake of potential future
bisects.

Partially reverts e77330bc3fe7.

src/input/keyboard.c

index b99555d66e28793602a5cf279e7552e3f504d358..005fa263db1a4192beddc1519bed7934bc2e33eb 100644 (file)
@@ -359,19 +359,6 @@ handle_compositor_keybindings(struct keyboard *keyboard,
                goto out;
        }
 
-       /*
-        * A keybind is not considered valid if other keys are pressed at the
-        * same time.
-        *
-        * In labwc, a keybind is defined by one/many modifier keys + _one_
-        * non-modifier key. Returning early on >1 pressed non-modifier keys
-        * avoids false positive matches where 'other' keys were pressed at the
-        * same time.
-        */
-       if (key_state_nr_pressed_keys() > 1) {
-               return false;
-       }
-
        /*
         * Handle compositor keybinds
         *