mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
Add support for bincode command
If a bindsym and bincode maps to the same combination, the last one will overwrite any previous mappings.
This commit is contained in:
parent
cb8ac7fd4a
commit
f8b260d4a1
5 changed files with 105 additions and 7 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue