Skip to content

Commit

Permalink
keysyms: Fix case mapping for 3 Latin 1 keysyms
Browse files Browse the repository at this point in the history
Fixed the upper case mappings for:
- XKB_KEY_ydiaeresis
- XKB_KEY_mu
- XKB_KEY_ssharp
  • Loading branch information
wismill committed Dec 14, 2023
1 parent 3a09c7f commit 436b737
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/keysym.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,8 @@ UCSConvertCase(uint32_t code, xkb_keysym_t *lower, xkb_keysym_t *upper)
static void
XConvertCase(xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper)
{
/* Latin 1 keysym */
if (sym < 0x100) {
/* Latin 1 keysym (first part: fast path) */
if (sym < 0xb5) {
UCSConvertCase(sym, lower, upper);
return;
}
Expand All @@ -821,6 +821,16 @@ XConvertCase(xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper)
*upper = sym;

switch(sym >> 8) {
case 0: /* Latin 1 (second part) */
if (sym == XKB_KEY_mu)
*upper = XKB_KEY_Greek_MU;
else if (sym == XKB_KEY_ssharp)
*upper = XKB_KEYSYM_UNICODE_OFFSET + 0x1e9e;
else if (sym == XKB_KEY_ydiaeresis)
*upper = XKB_KEY_Ydiaeresis;
else
UCSConvertCase(sym, lower, upper);
break;
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym == XKB_KEY_Aogonek)
Expand Down

0 comments on commit 436b737

Please sign in to comment.