Win32 keyboard handling changes



For some days I have been hacking on the keyboard event handling code
in gdk/win32/gdkevents-win32.c. 

The biggest problems that needed fixing were those described in bugs
#115902 and #104662.

(#115902: The code waited for the WM_CHAR messages for most key
presses, and then generated both a key press and release GDK event,
even if the key hadn't actually been released yet. The fixed code
handles only WM_KEYDOWN and WM_KEYUP messages, and the press and
release GDK events are generated accordingly. Related to this, the
code could be much simplified.

#104662: If an IME was used to input a sequence of several Unicode
characters, inly the first one was made into a GDK event. Now GDK
events are generated for all the characters.)

I am now mostly satisfied with how things are working (even though the
code still needs some refactoring). However, some things that used to
work don't work any longer. I would like feedback on how important
these issues are...

- Previously, the Windowsish way of using Alt+keypad numbers way to
input arbirtary characters from the *current codepage* worked. Not any
longer. I don't see this as a big issue, as for GTK text entry, the
Control+Shift+hex digits way of inputting *Unicode* characters work,
and IMHO Unicode is preferrable to codepages anyway.

- Previously, if you typed a control-letter on a non-Latin keyboard,
ASCII control character GDK events were still generated. (There is/was
hacks in the code to look up what ASCII character would be generated
if the keyboard layout were that of some Latin-based language.) In the
fixed code, typing Control-alpha on a Greek keyboard, for instance,
generates GDK events with keyval = Greek_alpha and the CONTROL bit
on. Is this acceptable? How does it work on X11?

- The Windows keyboards have some dead keys that the tables in
GtkIMContextSimple don't recognize, like the Greek dialytika and tonos
(U+0385). Should these be added to gtkimcontextsimple.c? Not that I
know how important these are to actual users of such keyboards.)

(If somebody else who builds GTK on Win32 herself wants to check out
the fixes before I commit to CVS, please mail me.)

--tml





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]