diff options
author | Mikkel Oscar Lyderik <[email protected]> | 2016-01-09 17:40:19 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <[email protected]> | 2016-01-09 18:07:47 +0100 |
commit | f8b260d4a1295df68ef1ff7db89f21e6032d64c7 (patch) | |
tree | 228810591abade5a021f6b2ea1da8f22826f4ee9 /sway/handlers.c | |
parent | cb8ac7fd4a0c8c11f97cc913391c4d04a7b4277b (diff) |
Add support for bincode command
If a bindsym and bincode maps to the same combination, the last one will
overwrite any previous mappings.
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 76778450..60bfac87 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -363,9 +363,16 @@ static bool handle_bindsym(struct sway_binding *binding) { bool match = false; int i; for (i = 0; i < binding->keys->length; ++i) { - xkb_keysym_t *key = binding->keys->items[i]; - if ((match = check_key(*key, 0)) == false) { - break; + if (binding->bindcode) { + xkb_keycode_t *key = binding->keys->items[i]; + if ((match = check_key(0, *key)) == false) { + break; + } + } else { + xkb_keysym_t *key = binding->keys->items[i]; + if ((match = check_key(*key, 0)) == false) { + break; + } } } |