Index: src_plugins/hid_gtk/gui-output-events.c =================================================================== --- src_plugins/hid_gtk/gui-output-events.c (revision 1603) +++ src_plugins/hid_gtk/gui-output-events.c (revision 1604) @@ -173,6 +173,7 @@ if (state & GDK_MOD1_MASK) mods |= M_Alt; if (state & GDK_CONTROL_MASK) mods |= M_Ctrl; if (state & GDK_SHIFT_MASK) { +/* TODO#3: this works only on US keyboard */ static const char *ignore_shift = "~!@#$%^&*()_+{}|:\"<>?"; if ((kv < 32) || (kv > 126) || (strchr(ignore_shift, kv) == NULL)) { mods |= M_Shift; Index: src_plugins/hid_lesstif/menu.c =================================================================== --- src_plugins/hid_lesstif/menu.c (revision 1603) +++ src_plugins/hid_lesstif/menu.c (revision 1604) @@ -702,6 +702,19 @@ return 1; } +/* TODO#3: this works only on US keyboard */ + if (mods & M_Shift) { + static const char *lower = "`1234567890-=[]\\;',./"; + static const char *upper = "~!@#$%^&*()_+{}|:\"<>?"; + char *l; + if ((sym >= 'A') && (sym <= 'Z')) + sym = tolower(sym); + else if ((l = strchr(lower, sym)) != NULL) { + sym = upper[l - lower]; + mods &= ~M_Shift; + } + } + printf("KEY lookup: mod=%x sym=%x/%d\n", mods, sym, slen); slen = hid_cfg_keys_input(&lesstif_keymap, mods, sym, seq, &seq_len);