LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Shortcut key == Popup menu ?

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

 

 

 

0 Kudos
Message 1 of 7
(4,027 Views)

May this be the equivalent of this key?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 7
(4,026 Views)

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.

0 Kudos
Message 3 of 7
(4,023 Views)

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.

0 Kudos
Message 4 of 7
(4,005 Views)

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!

0 Kudos
Message 5 of 7
(3,991 Views)

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.

 

 

popup_button.png

 

 

 

 

 

 

//----------------------------------------------------------------------------
//  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;
}

 

0 Kudos
Message 6 of 7
(3,979 Views)

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.

popup-menu-key.jpg

 

-> 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

0 Kudos
Message 7 of 7
(3,974 Views)