Mac can't use Return or Enter for menu shortcut?
BlitzMax Forums/MaxGUI Module/Mac can't use Return or Enter for menu shortcut?
| ||
Is this an omission in MaxGUI, or an OS limitation?' createmenu.bmx
Import MaxGui.Drivers
Strict
Local window:TGadget
Local filemenu:TGadget
Local editmenu:TGadget
Local helpmenu:TGadget
window=CreateWindow("My Window",40,40,320,240)
filemenu=CreateMenu("&File",0,WindowMenu(window))
CreateMenu"&New",0,filemenu,KEY_RETURN
CreateMenu"&Open",0,filemenu,KEY_ENTER
UpdateWindowMenu window
While True
WaitEvent
Wend |
| ||
| As far as I know an OS limitation: I think OS X does not allow you to create menu shortcuts that would interfere with the intended usage of that key (for enter/return e.g. selecting the default option in dialog boxes or entering text in text boxes). If you want to catch such a key press for other uses, you have to implement your own event handler for the keystrokes. |