commit-gnue
[Top][All Lists]
Advanced

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

[gnue] r8172 - trunk/gnue-forms/src/uidrivers/wx26/widgets


From: johannes
Subject: [gnue] r8172 - trunk/gnue-forms/src/uidrivers/wx26/widgets
Date: Tue, 21 Feb 2006 08:51:14 -0600 (CST)

Author: johannes
Date: 2006-02-21 08:51:14 -0600 (Tue, 21 Feb 2006)
New Revision: 8172

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
Log:
Simpler key-handling for all entry widgets


Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py        2006-02-21 
10:09:53 UTC (rev 8171)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py        2006-02-21 
14:51:14 UTC (rev 8172)
@@ -185,19 +185,16 @@
           event.CmdDown (),
           event.AltDown ())
 
+      # This is a temporary workaround: since the KeyMapper encapsulates all
+      # unknown keys into a UserCommand we have no chance on Mac to enter
+      # symbols like @ or the euro-sign.
+      if 'wxMac' in wx.PlatformInfo and command == 'USERCOMMAND':
+        command = None
+
       if command:
         self._request (command, triggerName = args)
 
-      # This is a bit hackish, but on windows, the keycode and unicode keycode
-      # for function keys is different; anyway, we want to replace this with a
-      # better and cleaner solution soon
-      elif '__WXMSW__' in wx.PlatformInfo:
-        if unikey == keycode:
-          self._keypress (unichr (unikey))
-        else:
-          event.Skip ()
-
-      elif unikey:
+      elif unikey == keycode or unikey > 127:
         self._keypress (unichr (unikey))
 
       else:





reply via email to

[Prev in Thread] Current Thread [Next in Thread]