mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
input: bindings: don't match raw key code alone - mods must also match
This commit is contained in:
parent
c87cec8c1e
commit
a69b818a62
2 changed files with 8 additions and 2 deletions
5
input.c
5
input.c
|
|
@ -558,8 +558,11 @@ keyboard_key(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
|
|||
* User configurable bindings
|
||||
*/
|
||||
tll_foreach(wayl->kbd.bindings.key, it) {
|
||||
if (it->item.mods != effective_mods)
|
||||
continue;
|
||||
|
||||
/* Match symbol */
|
||||
if (it->item.mods == effective_mods && it->item.sym == sym) {
|
||||
if (it->item.sym == sym) {
|
||||
input_execute_binding(term, it->item.action, serial);
|
||||
goto maybe_repeat;
|
||||
}
|
||||
|
|
|
|||
5
search.c
5
search.c
|
|
@ -430,8 +430,11 @@ search_input(struct terminal *term, uint32_t key, xkb_keysym_t sym,
|
|||
* User configurable bindings
|
||||
*/
|
||||
tll_foreach(term->wl->kbd.bindings.search, it) {
|
||||
if (it->item.mods != mods)
|
||||
continue;
|
||||
|
||||
/* Match symbol */
|
||||
if (it->item.mods == mods && it->item.sym == sym) {
|
||||
if (it->item.sym == sym) {
|
||||
input_execute_binding(term, it->item.action, serial);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue