XForms: Shortcuts for forms ?

Richard Kent (rk@quadstone.com)
Wed, 22 Oct 1997 09:37:36 +0100

To subscribers of the xforms list from Richard Kent <rk@quadstone.com> :

Howdy,

Now I sincerely hope this ain't a FAQ (I have looked through the manual and tried
experimenting with code) but I believe there is a "missing function" in xforms (gasp) !!

Is it possible to add a shortcut key combination to a form (not an object) such that
whenever that key combination is pressed within the form the callback is executed ? Say,
for example, you want Control-Q to be quit (a common request). At present it appears you
must attach shortcuts to objects so I have coded an invisible (hidden) button with the
appropriate shortcut (and the quit code in the button callback). But this really is
unsuitable as I have many other functions (cut, copy, paste) which require shortcuts and I
don't necessarily want to add hidden buttons for them all - mainly as it makes the .fd file
very messy. I believe there should be a call "fl_add_form_shortcut" or something which will
let you attach shortcut callbacks to a form (let me know if this is already possible !!).

Also - I sincerely think that menu shortcuts should allow for this. Currently the menu
shortcuts appear to work such that you have to push two keyboard shortcuts to get a menu
item to operate (one shortcut to select the menu and then one shortcut to select the menu
item). It would be nice if you could just say, for example, the shortcut for item 6 on the
file menu (quit) is Control-Q and then pressing Control-Q in the form in which the menu
item exists will activate that menu item directly (rather having to push Alt-F for the file
menu then pushing Q for quit - which is currently the way). In fact, both direct and
indirect shortcuts could coexist such that both methods (Control-Q and Alt-F/Q) work.

Comments anyone ?

TicH

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/