[fxruby-users] Hot keys working?

Roy Sutton roys at mindspring.com
Sun Jul 31 23:32:03 EDT 2005

Yes, hotkeys work... mostly.  (And I assume you mean accelerators)  Here 
are two examples from my source code:

        self.accelTable.addAccel(fxparseAccel("Ctrl-F4"), self, 
        FXMAPFUNC(SEL_COMMAND, FXApp::ID_LAST+124,          :do_close_file)

(Map a hotkey to a function.  Note:  You should probably use an 
enumeration for the ID number instead of the hack I was doing here.  
This was just from a spike attempt, not production code)

plugin['/system/ui/fox/FXApp'].data, FXSEL(SEL_COMMAND, FXApp::ID_QUIT))

(Map an accelerator to an existing command ID.  Another example from my 

The 'mostly' part of my statement was from the fact that the third 
parameter passed to the function in the first example cannot be accessed 
without causing a segmentation fault.  Another list member said he gave 
up on doing them that way.  Check the archives, it was within the last 
week or so we had that discussion.

Jacob Hanson wrote:

>Hello list,
>I'm using fxruby12 and I'm having trouble getting hotkeys to work.
>I've spent some time digging through the examples, the manual, and
>even the FOX source, but to no avail. Are hot keys working in fxruby?
>Does anyone have a working example?
>       _/ _/  _/   Jacob Hanson
>      _/ _/_/_/   mailto:jacdx at jacobhanson.com
> _/_/_/ _/  _/   http://www.jacobhanson.com
>fxruby-users mailing list
>fxruby-users at rubyforge.org

More information about the fxruby-users mailing list