diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-02 16:15:31 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-02 22:35:39 +0200 |
| commit | 03b67a512ec9ef1cf5c337aa5c47a5a76d4a8a61 (patch) | |
| tree | 82ba3fcb9d5adde69e43e6e2bd3dca3ddb5a920b /editor/update.cpp | |
| parent | dce44862c64f50411a4f09713382b60a0e904d92 (diff) | |
editor: show actual keycode in unhandled key message
Note that `SDL_GetModState()` is a trivial accessor.
Diffstat (limited to 'editor/update.cpp')
| -rw-r--r-- | editor/update.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/update.cpp b/editor/update.cpp index d90023b7..0fe064c0 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -169,14 +169,14 @@ void app::do_escape() kill_popups(false); } -void app::do_key(key k, int mods) +void app::do_key(key k, int mods, int keycode) { (void)mods; switch (k) { default: if (k >= key_NO_REPEAT) - fm_warn("unhandled key: '%zu'", size_t(k)); + fm_warn("unhandled key: '%d'", keycode); return; case key_noop: return; @@ -222,7 +222,7 @@ void app::apply_commands(const key_set& keys) using value_type = key_set::value_type; for (value_type i = key_MIN; i < key_NO_REPEAT; i++) if (const auto k = key(i); keys[k]) - do_key(k, key_modifiers.data[i]); + do_key(k, key_modifiers.data[i], 0); } void app::update_world(Ns dt) |
