input: bindings: don't match raw key code alone - mods must also match

This commit is contained in:
Daniel Eklöf 2020-03-18 14:52:39 +01:00
parent c87cec8c1e
commit a69b818a62
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 8 additions and 2 deletions

View file

@ -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;
}