[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] Text insertion bug
- From: Alex Bligh <alex@xxxxxxxxxxx>
- Date: Mon, 10 Apr 2006 11:17:52 +0100
- Subject: Re: [XaraXtreme-dev] Text insertion bug
Luke,
That could well be related, since currently the code uses dummy codes
(see texttool.cpp:1072)
The thread is pasted below
Alex
Andy Robinson wrote:
On Sun, 2006-04-09 at 00:27 +0200, Vadim Zeitlin wrote:
On Sat, 08 Apr 2006 13:51:18 +0100 Andy Robinson
<andy@xxxxxxxxxxxxxxxxx> wrote:
AR> In defs.h we see the enum:
AR> WXK_START = 300,
AR> WXK_LBUTTON,
AR> WXK_RBUTTON,
AR> etc.
AR>
AR> The starting value of 300 was obviously chosen to not be a possible
AR> character code, in pre-unicode days. But these codes now overlap
valid
AR> unicode characters, see http://www.unicode.org/charts/PDF/U0100.pdf
This is why we (unfortunately) have GetKeyCode() and GetUnicodeKey().
AR> Thus on my Mac if I type alt-shift-Q in TextEdit, it's the character
AR> 'OE' ligature = Unicode 0x152 = decimal 338 = WXK_SEPARATOR!
This is not a problem if you use GetUnicodeKey().
Regards,
VZ
I don't see why it is not a problem. What is GetUnicodeKey supposed to
return when the user types a WXK_ key such as an arrow? Not a WXK_ code
as this would be a unicode char. I've looked in 2.6.3 docs for all refs
to GetUnicodeChar, the point is not mentioned.
You need to check both. If GetKeyCode returns a value >= WXK_START then it
is a function or other special key. If not then you can then use
GetUnicodeKey to get the actual character value that should be used.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@xxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: wx-users-help@xxxxxxxxxxxxxxxxxxx