[fxruby-users] Issue with callback

Panich, Alexander alexander.panich at intel.com
Wed Jul 27 03:49:26 EDT 2005

Hi, Roy.

To trap keyboard you can to c-tor (initialize) mapping:	
 FXMAPFUNC(SEL_KEYPRESS, 0,"handleKeyPressed")

And the implementation can be something like this:

def handleKeyPressed
   keyvalue = 97 # a
   keystate = 8 # Alt
   if ( ptr.code == keyvalue and ptr.state == keystate )
      #handle event
   elsif (ptr.code == ...


-----Original Message-----
From: fxruby-users-bounces at rubyforge.org
[mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Roy Sutton
Sent: Wednesday, July 27, 2005 6:17 AM
To: fxruby-users at rubyforge.org
Subject: Re: [fxruby-users] Issue with callback


Thanks for the info.  Any chance you can remember how you trapped the 
key codes?


Jamey Cribbs wrote:

> I ended up removing all of the addAccel code and figured out a 
> different way to add hotkey support (I think I ended up trapping for 
> the actual key codes).

fxruby-users mailing list
fxruby-users at rubyforge.org

More information about the fxruby-users mailing list