fix some broken stuff

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@232 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-08 18:13:13 +00:00
parent 7b0173e7c4
commit 9d2b51402d
3 changed files with 25 additions and 8 deletions

View File

@@ -185,15 +185,18 @@ void MwLLNextEvent(MwLL handle) {
int n;
KeySym sym = XLookupKeysym(&ev.xkey, 0);
char* str = XKeysymToString(sym);
char s = str == NULL ? 0 : str[0];
/* HACK: this is bad, you can guess why */
if(strlen(str) == 1) {
char s = str == NULL ? 0 : str[0];
if(ev.xkey.state & (ShiftMask | LockMask)) {
n = toupper((int)s);
} else {
n = s;
if(ev.xkey.state & (ShiftMask | LockMask)) {
n = toupper((int)s);
} else {
n = s;
}
MwLLDispatch(handle, key, &n);
}
MwLLDispatch(handle, key, &n);
}
if(render) {
int x, y;