diff options
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r-- | sway/input/keyboard.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 326ee584..8b43df82 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include "sway/input/seat.h" | 3 | #include "sway/input/seat.h" |
4 | #include "sway/input/keyboard.h" | 4 | #include "sway/input/keyboard.h" |
5 | #include "sway/input/input-manager.h" | 5 | #include "sway/input/input-manager.h" |
6 | #include "sway/commands.h" | ||
6 | #include "log.h" | 7 | #include "log.h" |
7 | 8 | ||
8 | static size_t pressed_keysyms_length(xkb_keysym_t *pressed_keysyms) { | 9 | static size_t pressed_keysyms_length(xkb_keysym_t *pressed_keysyms) { |
@@ -80,7 +81,7 @@ static bool keyboard_execute_binding(struct sway_keyboard *keyboard, | |||
80 | for (int j = 0; j < binding->keys->length; ++j) { | 81 | for (int j = 0; j < binding->keys->length; ++j) { |
81 | match = | 82 | match = |
82 | pressed_keysyms_index(pressed_keysyms, | 83 | pressed_keysyms_index(pressed_keysyms, |
83 | *(int*)binding->keys->items[j]) < 0; | 84 | *(int*)binding->keys->items[j]) >= 0; |
84 | 85 | ||
85 | if (!match) { | 86 | if (!match) { |
86 | break; | 87 | break; |
@@ -88,7 +89,13 @@ static bool keyboard_execute_binding(struct sway_keyboard *keyboard, | |||
88 | } | 89 | } |
89 | 90 | ||
90 | if (match) { | 91 | if (match) { |
91 | sway_log(L_DEBUG, "TODO: executing binding command: %s", binding->command); | 92 | sway_log(L_DEBUG, "running command for binding: %s", binding->command); |
93 | struct cmd_results *results = handle_command(binding->command); | ||
94 | if (results->status != CMD_SUCCESS) { | ||
95 | sway_log(L_DEBUG, "could not run command for binding: %s", | ||
96 | binding->command); | ||
97 | } | ||
98 | free_cmd_results(results); | ||
92 | return true; | 99 | return true; |
93 | } | 100 | } |
94 | } | 101 | } |