summaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-28 21:03:38 +0200
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-28 21:05:38 +0200
commit1fb9489032ca8fed47798e5051a0f8ddf6e105d7 (patch)
treeafb4df145abc7145a5dafcbacda8795c84c82d06 /sway/commands.c
parentMerge pull request #610 from sleep-walker/master (diff)
downloadsway-1fb9489032ca8fed47798e5051a0f8ddf6e105d7.tar.gz
sway-1fb9489032ca8fed47798e5051a0f8ddf6e105d7.tar.zst
sway-1fb9489032ca8fed47798e5051a0f8ddf6e105d7.zip
Fix bindcode by offsetting xkb keycode by 8
The bindcode has to be offset by 8 to match the keycode we get from wlc. https://github.com/xkbcommon/libxkbcommon/blob/master/xkbcommon/xkbcommon.h#L160
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 34364917..c1390016 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -335,7 +335,7 @@ static struct cmd_results *cmd_bindcode(int argc, char **argv) {
335 return error; 335 return error;
336 } 336 }
337 xkb_keycode_t *key = malloc(sizeof(xkb_keycode_t)); 337 xkb_keycode_t *key = malloc(sizeof(xkb_keycode_t));
338 *key = keycode; 338 *key = keycode - 8;
339 list_add(binding->keys, key); 339 list_add(binding->keys, key);
340 } 340 }
341 free_flat_list(split); 341 free_flat_list(split);