diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-23 15:52:13 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-23 15:52:36 -0400 |
commit | f30fb2452c733073290e08ea12e3c031726e5d71 (patch) | |
tree | 2333cae7ec1e1916e305a2bc7572efaed3282004 | |
parent | 9a7f48f87272dea8cb1e678673b2fe95dc993d68 (diff) | |
download | sway-f30fb2452c733073290e08ea12e3c031726e5d71.tar.xz |
Minor fixes to keyboard handling
-rw-r--r-- | sway/handlers.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 27f6d294..3a4e31ae 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -298,6 +298,8 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier struct sway_mode *mode = config->current_mode; + sym = tolower(sym); + int i; if (state == WLC_KEY_STATE_PRESSED) { @@ -310,7 +312,7 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier for (i = 0; i < mode->bindings->length; ++i) { struct sway_binding *binding = mode->bindings->items[i]; - if ((modifiers->mods & binding->modifiers) == binding->modifiers) { + if ((modifiers->mods ^ binding->modifiers) == 0) { bool match; int j; for (j = 0; j < binding->keys->length; ++j) { |