diff options
author | Padraig O'Briain <padraigo@src.gnome.org> | 2002-03-15 10:06:02 +0000 |
---|---|---|
committer | Padraig O'Briain <padraigo@src.gnome.org> | 2002-03-15 10:06:02 +0000 |
commit | ab62fadd82f5ee05da26942832a5a8d72de91c2b (patch) | |
tree | 2daace050ea4877f94aa897b38dfea17dbabf07a /gdk | |
parent | 33aaf076481c5d53224697da1479e6c7a1b9d191 (diff) | |
download | gdk-pixbuf-ab62fadd82f5ee05da26942832a5a8d72de91c2b.tar.gz |
Fudge keymap to have lower upper case variants if there is only a single
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower
upper case variants if there is only a single keysym per keycode and
the key symbol has upper and lower case variants (#74512)
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/x11/gdkkeys-x11.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c index f80b742ab..c499d9620 100644 --- a/gdk/x11/gdkkeys-x11.c +++ b/gdk/x11/gdkkeys-x11.c @@ -166,6 +166,24 @@ update_keymaps (void) if (syms[KEYSYM_INDEX (i, 0)] == GDK_Tab) syms[KEYSYM_INDEX (i, 1)] = GDK_ISO_Left_Tab; } + + /* + * If there is one keysym and the key symbol has upper and lower + * case variants fudge the keymap + */ + if (syms[KEYSYM_INDEX (0, 1)] == 0) + { + guint lower; + guint upper; + + gdk_keyval_convert_case (syms[KEYSYM_INDEX (0, 0)], &lower, &upper); + if (lower != upper) + { + syms[KEYSYM_INDEX (0, 0)] = lower; + syms[KEYSYM_INDEX (0, 1)] = upper; + } + } + ++keycode; } |