mirror of
https://github.com/labwc/labwc.git
synced 2025-11-01 22:58:47 -04:00
<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
12 lines
442 B
C
12 lines
442 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef __LABWC_KEY_STATE_H
|
|
#define __LABWC_KEY_STATE_H
|
|
|
|
void key_state_set_pressed(uint32_t keycode, bool ispressed);
|
|
void key_state_store_pressed_keys_as_bound(void);
|
|
bool key_state_corresponding_press_event_was_bound(uint32_t keycode);
|
|
|
|
/* returns numbers of keys still pressed in a consumed key combination */
|
|
int key_state_bound_key_remove(uint32_t keycode);
|
|
|
|
#endif /* __LABWC_KEY_STATE_H */
|