diff options
-rw-r--r-- | editor/events.cpp | 15 | ||||
-rw-r--r-- | editor/update.cpp | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/editor/events.cpp b/editor/events.cpp index a69d0e65..d559022c 100644 --- a/editor/events.cpp +++ b/editor/events.cpp @@ -113,6 +113,21 @@ auto app::resolve_keybinding(int k_, int mods_) -> std::tuple<key, int> [[maybe_unused]] constexpr int ALT = kmod_alt; [[maybe_unused]] constexpr int SUPER = kmod_super; + switch (k_) + { + case SDLK_LSHIFT: + case SDLK_RSHIFT: + case SDLK_LCTRL: + case SDLK_RCTRL: + case SDLK_LALT: + case SDLK_RALT: + case SDLK_LGUI: + case SDLK_RGUI: + return { key_noop, kmod_mask }; + default: + break; + } + const int k = k_ | fixup_mods(mods_); constexpr kmod list[] = { kmod_none, kmod_super, kmod_alt, kmod_shift, kmod_ctrl, }; int last = ~0; diff --git a/editor/update.cpp b/editor/update.cpp index 2311d478..d90023b7 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -178,6 +178,8 @@ void app::do_key(key k, int mods) if (k >= key_NO_REPEAT) fm_warn("unhandled key: '%zu'", size_t(k)); return; + case key_noop: + return; case key_rotate_tile: return do_rotate(false); case key_emit_timestamp: |