Skip to content

Commit

Permalink
Fix bindcode by offsetting xkb keycode by 8
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mikkeloscar committed Apr 28, 2016
1 parent 17543d3 commit 1fb9489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sway/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1fb9489

Please sign in to comment.