08-10-2011 12:14 PM
Hello,
when editing my menu bar in the UI editor I realized a shortcut key I haven't noticed before, i.e. the last entry after 'Z' is Popup menu. In the help for ATTR_SHORTCUT_KEY I found
VAL_POPUP_MENU_VKEY | The Applications virtual key |
Now I am wondering what the virtual key of my application is...? And how will the user know that 'Popup menu' means pressing a key?
Thanks for enlightenment,
Wolfgang
08-10-2011 04:56 PM
May this be the equivalent of this key?
08-10-2011 11:12 PM
Thanks for looking into it, Roberto!
- My keyboard does have a key located in between Alt and Ctrl, it's called FN and could be the one you describe. However it does not do anything, i.e. it does not work as shortcut key for the menu. I've also tried the Windows key, which is is also different. So I still miss the key that acts as shortcut for this menu entry.
- If this label 'Popup menu' refers to a key, I would prefer a different wording (FN key...). Right now reading 'Popup menu' I would never think of a shortcut key.
08-12-2011 09:13 AM
I never even realized that key was on my board until now! wow. On one board I have "fn", but the one I am using currently has the popup key. I guess it is a remnant from when people would tab through webpages and use it as a right-click.
08-13-2011 03:49 AM
Hello TurboMetrologist,
Would you mind and test if your popup key is accepted as shortcut key for the popup menu? Obviously FN key and Popup key are not identical, so on my keyboard the strange Popup menu shortcut does not provide any functionality...
Thanks!
08-15-2011 08:04 AM
Sure. I have version 6.0, and didn't see VAL_POPUP_MENU_VKEY. However, I verified that the popup key (menu key) is the value 9984.
//---------------------------------------------------------------------------- // Key Press Event / Shortcut Function //---------------------------------------------------------------------------- int CVICALLBACK checkKeyPress(int panel, int event, void *callbackData, int eventData1, int eventData2){ int keyCode; switch (event) { case EVENT_KEYPRESS: if(keyCode = GetKeyPressEventVirtualKey (eventData2)){ DebugPrintf ("%d\n", keyCode); } else if(keyCode = GetKeyPressEventCharacter (eventData2)){ DebugPrintf ("%d\n", keyCode); } switch(keyCode){ case 9984: simpleMessage("Check Key Press","Popup button works."); break; case 49: FakeKeystroke (9984);//VAL_POPUP_MENU_VKEY break; break; } } return 0; }
08-15-2011 08:44 AM - edited 08-15-2011 08:49 AM
Thank you!
In the mean time I also got a keyboard featuring this menu key and tried the shortcut for the menu.
Pressing this key indeed works as shortcut for the menu entry. However, it also launches a context menu, as described by the Wikipedia article linked by TurboMetrologist; in my particular case the menu entry calls a multifileselectpopup, and using the menu key as shortcut results in the display of the undo/edit context menu, see attached figure.
-> I guess I am not going to use this shortcut...
-> Based on the knowledge gained by reading the Wikipedia article I would suggest renaming this shortcut key from Popup menu to Menu key or Application key