Author: johannes Date: 2006-08-24 02:32:31 -0500 (Thu, 24 Aug 2006) New Revision: 8616
Modified: branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py Log: Fixed handling of up/down keys in multiline-edits Modified: branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py =================================================================== --- branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py 2006-08-24 07:30:09 UTC (rev 8615) +++ branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py 2006-08-24 07:32:31 UTC (rev 8616) @@ -327,10 +327,18 @@ gDebug (2, "__keypress: %s %s" % (keycode, unikey)) - (command, args) = GFKeyMapper.KeyMapper.getEvent (keycode, - event.ShiftDown (), - event.CmdDown (), - event.AltDown ()) + # Another workaround: To avoid up and down-keys from being converted into + # a record-navigation command we trap them here and make sure to have an + # updateInsertionPoint called later. + wxctrl = event.GetEventObject() + if isinstance(wxctrl, wx.TextCtrl) and wxctrl.IsMultiLine() \ + and keycode in [wx.WXK_UP, wx.WXK_DOWN]: + command = None + else: + (command, args) = GFKeyMapper.KeyMapper.getEvent (keycode, + event.ShiftDown (), + 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 _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue