From 1fb9489032ca8fed47798e5051a0f8ddf6e105d7 Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Thu, 28 Apr 2016 21:03:38 +0200 Subject: [PATCH] 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 --- sway/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { return error; } xkb_keycode_t *key = malloc(sizeof(xkb_keycode_t)); - *key = keycode; + *key = keycode - 8; list_add(binding->keys, key); } free_flat_list(split);