From 1b28c8e482c9f50d6ea81ebf38baf2b39661b643 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 8 Apr 2016 18:19:07 -0300 Subject: [PATCH] Fix Alt+key on Linux (fix #83 and #191) --- src/she/alleg4/she.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/she/alleg4/she.cpp b/src/she/alleg4/she.cpp index 48c4ed176..37e14072a 100644 --- a/src/she/alleg4/she.cpp +++ b/src/she/alleg4/she.cpp @@ -224,6 +224,15 @@ void error_message(const char* msg) bool is_key_pressed(KeyScancode scancode) { + if (scancode == kKeyLShift || scancode == kKeyRShift) { + return key_shifts & KB_SHIFT_FLAG; + } + else if (scancode == kKeyLControl || scancode == kKeyRControl) { + return key_shifts & KB_CTRL_FLAG; + } + else if (scancode == kKeyAlt) { + return key_shifts & KB_ALT_FLAG; + } return key[scancode] ? true: false; }