ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxpython-users
wxpython-users
Re: [wxpython-users] ESC not working on XP
by Roee Shlomo other posts by this author
May 9 2008 7:41AM messages near this date
[wxpython-users] ESC not working on XP | [wxpython-users] newbie with questions
> 
>  But  ESCAPE does nothing on WinXP

I reported this as a bug a long time ago:
http://sourceforge.net/tracker/index.php?func=detail&aid=1633945&group_id=9863&atid=109863
Too bad no one addressed this issue.


>  GetKeyCode does not work for an event called by an accelerator table
> 
Why don't you use different handlers for different IDs?
It makes more sense as F3, Alt+X and Esc will probably do something totaly
different.




On 5/9/08, Phillip Watts <phillip.watts@[...].com>  wrote:
> 
>  I'm using an accelerator table to
>  handle lots of key board events like:
>  wx.WXK_F1
>  wx.WXK_TAB
>  wx.WXK_DOWN
>  wx.WXK_UP
>  wx.WXK_PAGEDOWN
>  wx.WXK_PAGEUP
>  wx.WXK_ESCAPE
>  in lots of different frames.
> 
>  All of which work fine on Kubuntu and Fedora.
>  But  ESCAPE does nothing on WinXP.
>  Does escape have some special meaning on Win
>  which is overriding me?
> 
> 
>  ---------------------------------------------------------------------------------
>  Another subject.
>  GetKeyCode does not work for an event called by an accelerator
>  table.  How could I see which key was pressed?
>  Thanks
> 
>  def onaltx(event):
>         print 'altx'
>         k = event.GetKeyCode()
>         print k
>  accel_tbl = wx.AcceleratorTable([
>        (wx.ACCEL_NORMAL,wx.WXK_F3,902),
>        (wx.ACCEL_ALT, ord('X'), 901),
>        (wx.ACCEL_NORMAL,wx.WXK_ESCAPE,903),
>                                          ])
> 
>  f.SetAcceleratorTable(accel_tbl)
>  Traceback (most recent call last):
>  File "./wintest.py", line 53, in onaltx
>     k = event.GetKeyCode()
>  AttributeError: 'CommandEvent' object has no attribute 'GetKeyCode'
> 
> 
>  _______________________________________________
>  wxpython-users mailing list
>  wxpython-users@[...].org
>  http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
> 
Thread:
Phillip Watts
Roee Shlomo

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved