On Jan 17, 2007, at 10:47 AM, johnf wrote:

> I'd like to use F4 and F7 as keys to active a lookup routine.  On  
> my SUSE 10.2
> the following works:
> def onKeyChar(self, evt):
>       keyint = evt.keyCode
>       #print keyint
>       if keyint == 345 or keyint == 348:
>               self.Form.lookup()
>
> But would it work on other platforms?  I think it will not.  I bet  
> dabo/wx has
> a special way of reading function keys.  Could some provided the  
> right codes
> or the right way to do it.

        Check out dabo.ui.dKeys. Here's a sample with your code:

import dabo.ui.dKeys as dKeys

def onKeyChar(self, evt):
        if evt.keyChar == dKeys.key_F7:
                self.Form.lookup()


-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to