aboutsummaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-08-19 21:04:06 -0400
committerDrew DeVault <sir@cmpwn.com>2015-08-19 21:04:34 -0400
commite5d3074d702906f2da8f94d017fd687bebbc3d8e (patch)
treeb2ea6edbf0d85d3b2414a314f34ebe375a2753fa /sway/handlers.c
parentf2f719286569741bfc6658619cecd3dcaf9e4536 (diff)
Whitelist a handful of characters for keys
Ones that don't change when you hold shift
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 18f1d13c..d45340ad 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -336,7 +336,7 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
struct sway_mode *mode = config->current_mode;
- if (!isalnum(sym)) {
+ if (!isalnum(sym) && sym != ' ' && sym != XKB_KEY_Escape && sym != XKB_KEY_Tab) {
// God fucking dammit
return false;
}
@@ -391,7 +391,8 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
if (match) {
// Remove matched keys from keys_pressed
if (state == WLC_KEY_STATE_PRESSED) {
- cmd_success = handle_command(config, binding->command);
+ handle_command(config, binding->command);
+ cmd_success = true;
} else if (state == WLC_KEY_STATE_RELEASED) {
// TODO: --released
}