Fix glfw alphabet keys conversion

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-02-02 19:45:58 +00:00
parent 718ed4ad90
commit 29f9f1092c
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0

View file

@ -693,7 +693,13 @@ protected:
case kKeyNumLock: key = GLFW_KEY_NUM_LOCK; break;
case kKeyPrintScreen: key = GLFW_KEY_PRINT_SCREEN; break;
case kKeyPause: key = GLFW_KEY_PAUSE; break;
default: key = ev.key; break;
default:
// glfw expects uppercase
if (ev.key >= 'a' && ev.key <= 'z')
key = ev.key - ('a' - 'A');
else
key = ev.key;
break;
}
const ScopedContext sc(this, mods);