aboutsummaryrefslogtreecommitdiff
path: root/sway/input/keyboard.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-28 16:52:12 -0500
committerTony Crisci <tony@dubstepdish.com>2017-12-28 16:52:12 -0500
commit0b8481f41af32daf75324fc1f202bce62cc702f4 (patch)
treebd06e659ecebabc5fb84fb14da1288dd5210b087 /sway/input/keyboard.c
parent8d567cd06202b4d68bf45af6e76e5bdc49bfffee (diff)
fix keyboard_execute_bindcode
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r--sway/input/keyboard.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index 2464db12..eacb6ceb 100644
--- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c
@@ -183,17 +183,14 @@ static bool keyboard_execute_bindcode(struct sway_keyboard *keyboard) {
list_t *keycode_bindings = config->current_mode->keycode_bindings;
for (int i = 0; i < keycode_bindings->length; ++i) {
struct sway_binding *binding = keycode_bindings->items[i];
- //bool match = true;
- for (int j = 0; j < binding->keys->length; ++j) {
- if (binding_matches_keycodes(wlr_keyboard, binding)) {
- struct cmd_results *results = handle_command(binding->command);
- if (results->status != CMD_SUCCESS) {
- sway_log(L_DEBUG, "could not run command for binding: %s",
- binding->command);
- }
- free_cmd_results(results);
- return true;
+ if (binding_matches_keycodes(wlr_keyboard, binding)) {
+ struct cmd_results *results = handle_command(binding->command);
+ if (results->status != CMD_SUCCESS) {
+ sway_log(L_DEBUG, "could not run command for binding: %s",
+ binding->command);
}
+ free_cmd_results(results);
+ return true;
}
}