Fix Alt+key on Linux (fix #83 and #191)

This commit is contained in:
David Capello 2016-04-08 18:19:07 -03:00
parent 00be81dfa8
commit 1b28c8e482

View File

@ -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;
}