16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 17:09:19 +02:00

Remember which modifiers were present on key press and use them on key release

This fixes an issue where a triggered command stays indefinitely active
when the user releases the modifier before releasing the triggering key.
This commit is contained in:
Sebastian Krzyszkowiak
2026-06-29 23:19:39 +02:00
parent bb69986962
commit 6435c3d850
2 changed files with 12 additions and 1 deletions

View File

@@ -106,6 +106,7 @@ private:
// members
user_command m_command { user_command::none }; // last, if any, issued command
usercommand_map m_bindings;
std::unordered_map<int, int> m_modsforkeys; // modifiers that were used with the active keys
command_relay m_relay;
bindings_cache m_bindingscache;
glm::vec2 m_movementhorizontal { 0.f };