Skip to content

Commit 707c5fe

Browse files
emersionatx
authored andcommittedSep 22, 2021
Drop Unicode keysym workaround
I tried a lot of Unicode characters (e.g. "🐸") and it doesn't seem like libxkbcommon ever returns something beginning with "0x". It always returns the "U" string we expect. Additionally, the workaround is wrong: "U" keysyms need a Unicode code-point value, but we were using the keysym raw value instead. These are not equal (try for yourself by removing the "if" condition).
1 parent 6536edf commit 707c5fe

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed
 

‎main.c

-5
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,6 @@ static void print_keysym_name(xkb_keysym_t keysym, FILE *f)
431431
return;
432432
}
433433

434-
if (sym_name[0] == '0' && sym_name[1] == 'x') {
435-
// Unicode, we need special handling for these for whatever reason
436-
snprintf(sym_name, sizeof(sym_name), "U%04x", keysym);
437-
}
438-
439434
fprintf(f, "%s", sym_name);
440435
}
441436

0 commit comments

Comments
 (0)
Please sign in to comment.