Still: GdkEventKey --> utf-8 ?



On Thu, 10 Sep 2009, Joerg Anders wrote:



The result is:

keyval = 111 (0x6f)
unichar = 111 (0x6f)
utf8 = o

 a small correction the output for ö (HTML: ö) is:

keyval = 65506 (0xffe2)
unichar = 0 (0x0)
utf8 =
keyval = 65111 (0xfe57)
unichar = 0 (0x0)
utf8 =
keyval = 111 (0x6f)
unichar = 111 (0x6f)
utf8 = o

If I look on the text of the Spanish user ...

 + The key on the left of ç. (in red - has a blu { ) So:
 + I press and hold Shift, then press that key, unpress and type o.
 + Note: if you want an Ö you must hold shift key pressed until you
 + press o.
 + Look this is the way to do this, and works in all applications. The
 + same for ê, for example.
 +
 + For an á I have to press that key (without shift) and then a.
 +

.. I know what happens:

The SHIFT + the key with the blue { causes:

keyval = 65506
and
keyval = 65111

Then he presses 'o' key and that gives keyval = 111

That is: The sequence 65506, 65111, 111 should be interpreted as ö
(HTML: ö)

But I think I souldn't program this "by hand". Because the GdkEntry
widget apparently has this intelligence. So I guess there is some
further Gdk-function besides gdk_keyval_to_unicode() which knows how
to interpret the keyval sequence 65506, 65111, 111 from Spanish
keyboards.
This also explains why he gets different values for KeyPress event
and KeyRelease event in xev, because he only releases the 'o' key.

Any Spanish users/developers here ? How do you manage such input ?


--
J.Anders, GERMANY, TU Chemnitz, Fakultaet fuer Informatik


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