From a69b818a6232a3704e3125e17f7e392382faee84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 18 Mar 2020 14:52:39 +0100 Subject: [PATCH] input: bindings: don't match raw key code alone - mods must also match --- input.c | 5 ++++- search.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/input.c b/input.c index 8a51fe7a..492080a1 100644 --- a/input.c +++ b/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; } diff --git a/search.c b/search.c index 35d1be0f..1968565a 100644 --- a/search.c +++ b/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; }