[fxruby-users] Issue with callback
Roy Sutton
roys at mindspring.com
Wed Jul 27 07:19:43 EDT 2005
Thank you! This will be a better solution anyhow.
Panich, Alexander wrote:
>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 == ...
> ...
> end
>end
>
>Regards,
>Alex.
>
>
>-----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
>
>Jamey,
>
>Thanks for the info. Any chance you can remember how you trapped the
>key codes?
>
>Roy
>
>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
>http://rubyforge.org/mailman/listinfo/fxruby-users
>
>_______________________________________________
>fxruby-users mailing list
>fxruby-users at rubyforge.org
>http://rubyforge.org/mailman/listinfo/fxruby-users
>
>
>
>
>
More information about the fxruby-users
mailing list