]> git.mdlowis.com Git - proto/labwc.git/commit
keyboard: cancel repeat when handling key-bind
authorJohan Malm <jgm323@gmail.com>
Sun, 2 Jan 2022 15:28:35 +0000 (15:28 +0000)
committerJohan Malm <jgm323@gmail.com>
Sun, 2 Jan 2022 15:28:35 +0000 (15:28 +0000)
commite62bb51bfb33ee520e800cf98553d766824fe9cf
treeaff955996be9f41d395693526a7003b5e9fb714c
parent70845643af53d5d8212e91ef254a0b00de1e6b47
keyboard: cancel repeat when handling key-bind

<keybind key="W-d">
  <action name="Execute">
    <command>dmenu_run</command>
  </action>
</keybind>

When using the keybind above (in rc.xml), on the first execution of W-d
all is okay, but the second time, a "d" pressed event is sent to dmenu
resulting in a continuous "ddddddd...") which has to be stopped pressing a
key.

This behaviour started in commit 7e57b7f because release events associated
with keybinds are no longer sent to clients (before that commit, the
release event for the ā€œdā€ would have been passed to dmenu, thus cancelling
the repeat).

Solves issue #176

Helped-by: @spectrum70
include/key-state.h
src/key-state.c
src/keyboard.c