aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'input.c')
-rw-r--r--input.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/input.c b/input.c
index f5daf6b4..2db696c1 100644
--- a/input.c
+++ b/input.c
@@ -1582,21 +1582,25 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,
* User configurable bindings
*/
if (pressed) {
+ /* Match translated symbol */
tll_foreach(bindings->key, it) {
const struct key_binding *bind = &it->item;
- /* Match translated symbol */
if (bind->k.sym == sym &&
bind->mods == (mods & ~consumed) &&
execute_binding(seat, term, bind, serial, 1))
{
goto maybe_repeat;
}
+ }
+
+ /* Match untranslated symbols */
+ tll_foreach(bindings->key, it) {
+ const struct key_binding *bind = &it->item;
if (bind->mods != mods)
continue;
- /* Match untranslated symbols */
for (size_t i = 0; i < raw_count; i++) {
if (bind->k.sym == raw_syms[i] &&
execute_binding(seat, term, bind, serial, 1))
@@ -1604,8 +1608,15 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,
goto maybe_repeat;
}
}
+ }
+
+ /* Match raw key code */
+ tll_foreach(bindings->key, it) {
+ const struct key_binding *bind = &it->item;
+
+ if (bind->mods != mods)
+ continue;
- /* Match raw key code */
tll_foreach(bind->k.key_codes, code) {
if (code->item == key &&
execute_binding(seat, term, bind, serial, 1))