menu item keyboard shortcuts

0 views
Skip to first unread message

Ian Martins

unread,
Apr 22, 2010, 9:57:08 AM4/22/10
to SDL/Swing
is it possible to set keyboard shortcuts from within sdl? the
following didn't work:

menubar {
"File" {
"Exit" do="exit" accelerator="Ctrl+q"
}
}


--
Subscription settings: http://groups.google.com/group/sdlswing/subscribe?hl=en

Dan Leuck

unread,
Apr 22, 2010, 3:11:43 PM4/22/10
to sdls...@googlegroups.com
Sure. You can set the accelerator and mnemonic like so:

frame {
menubar {
"File" {
"Exit" do="exit" accelerator="ctrl Q" mnemonic="x"
}
}
form ID="App" {

}
}

Note that "menubar" above can also be written as "menus" as you see in
the OoiPad example.

Ian Martins

unread,
Apr 22, 2010, 3:42:17 PM4/22/10
to SDL/Swing
thanks, that worked.
Reply all
Reply to author
Forward
0 new messages