16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 08:49:18 +02:00

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

@@ -431,10 +431,6 @@ driver_mode::exit() {
void
driver_mode::on_key( int const Key, int const Scancode, int const Action, int const Mods ) {
Global.shiftState = ( Mods & GLFW_MOD_SHIFT ) ? true : false;
Global.ctrlState = ( Mods & GLFW_MOD_CONTROL ) ? true : false;
Global.altState = ( Mods & GLFW_MOD_ALT ) ? true : false;
bool anyModifier = Mods & (GLFW_MOD_SHIFT | GLFW_MOD_CONTROL | GLFW_MOD_ALT);
// give the ui first shot at the input processing...