Fix Shift/Ctrl/Alt key handling on Linux

On native Linux builds, due to weird key modifier handling, key modifiers often worked backwards.
Now modifer key handling is streamlined and is not mode-dependent.
This commit is contained in:
jakubg1
2025-09-05 14:54:29 +02:00
parent c83c123596
commit 6f1b03fccf
4 changed files with 7 additions and 10 deletions

View File

@@ -681,6 +681,13 @@ eu07_application::on_key( int const Key, int const Scancode, int const Action, i
if( m_modestack.empty() ) { return; }
if (Key == GLFW_KEY_LEFT_SHIFT || Key == GLFW_KEY_RIGHT_SHIFT)
Global.shiftState = Action == GLFW_PRESS;
if (Key == GLFW_KEY_LEFT_CONTROL || Key == GLFW_KEY_RIGHT_CONTROL)
Global.ctrlState = Action == GLFW_PRESS;
if (Key == GLFW_KEY_LEFT_ALT || Key == GLFW_KEY_RIGHT_ALT)
Global.altState = Action == GLFW_PRESS;
m_modes[ m_modestack.top() ]->on_key( Key, Scancode, Action, Mods );
}