]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - unix/unix.h
Work around OS X GTK treating Option as an AltGr key.
authorSimon Tatham <anakin@pobox.com>
Tue, 1 Sep 2015 18:10:29 +0000 (19:10 +0100)
committerSimon Tatham <anakin@pobox.com>
Tue, 1 Sep 2015 18:13:55 +0000 (19:13 +0100)
commit0afc496a5f46c401116b17d10974f2363aab8b86
treef453963e2d678bf9258c91e0a96fcb165389f0fd
parentdc253b3c51ac621f894653d0f04aef7d8f9ba8f1
Work around OS X GTK treating Option as an AltGr key.

If I'm using Option as the Meta key, I want to suppress OS X GTK's
default behaviour of treating it as an AltGr-oid which changes the
keyval and Unicode translation of alphabetic keys. So on OS X I enable
a somewhat bodgy workaround which retranslates from the hardware
keycode as if the Option modifier had not been active at the time, and
use that as the character to prefix Esc to.

This is a bit nasty because I have to hardwire group = 0 in the call
to gdk_keymap_translate_keyboard_state(), whereas in principle what I
wanted was group = (whatever would have resulted from everything else
in the key event other than MOD1). However, in practice, they seem to
be the same, so this will do for the moment.
unix/gtkwin.c
unix/unix.h