Hello everybody,
I do have some problems regarding the EVT_CHAR event. I'm getting
different events for the same keys on my WXMSW, WXGTK and WXMAC. My
question now is: is this a bug, or do I have to change my code ?
I've written a short piece of sample code I've used for my test. On each
platform I'm pressing these keys: "a", AltGr-E (Euro-Symbol), F1 and
Ctrl-a.
This is the sample-Code:
import wx
def OnKeyPress (event):
print "KC:", event.GetKeyCode (), "UC:", event.GetUnicodeKey ()
event.Skip ()
app = wx.PySimpleApp ()
f = wx.Frame (None)
e = wx.TextCtrl (f, -1)
e.Connect (-1, -1,wx.wxEVT_CHAR, OnKeyPress)
e.SetFocus ()
f.Fit ()
f.Show ()
app.MainLoop ()
And these are the results (all installations are unicode-versions):
On WXGTK 2.6.1.1.pre:
KC: 97 UC: 97
KC: 342 UC: 0
KC: 97 UC: 97
On WXMSW 2.6.1.1:
KC: 97 UC: 97
KC: 8364 UC: 8364
KC: 342 UC: 112
KC: 1 UC: 1
On WXMAC 2.5.3.1:
KC: 97 UC: 0
KC: 219 UC: 0
KC: 342 UC: 0
KC: 1 UC: 0
Q: Why is there *NO* EVT_CHAR event for AltGr-E on WXGKT, although the
proper Euro symbol appears in the entry widget ???
Q: Why is there a different KeyCode and UnicodeKey for F1 on WXMSW ?
Q: Why is the UnicodeKey on WXMAC always 0 ?
Can you please give me some help ?
Thanks in adavance,
Johannes
···
--
BYTEWISE Software GmbH Tel +43 (5577) 89877-0
i.A. Johannes Vetter Fax +43 (5577) 89877-66
A-6890 Lustenau, Enga 2 http://www.bytewise.at
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wir bieten Installation und Support für Ubuntu: ein auf
GNU/Linux basierendes Softwaresystem für Arbeitsplatzrechner