Virtual Key Designations

I am looking for the designations of some virtual keys -- https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes
specifically those of the bottom row as in this foto: https://www.eventus.si/hr/iimg/14817/i.jpg
from left to right:

The Left CONTROL key: VK_LCONTROL
The Left Windows key: VK_LWIN
The ALT key: VK_MENU or VK_LMENU?
SPACEBAR: VK_SPACE
The Right MENU key (marked with "Alt Gr"): VK_RMENU?
The Right Windows key: VK_RWIN
next one (with the rectangle): no idea, no savvy
The Right CONTROL key: VK_RCONTROL

Where could I find the mapping of the keys in question?
Last edited on
It's been a while since I played around with key code mappings....IIRC the rectangle key: VK_RMENU 0xA5. Usually mapped to a pop-up menu that can alternately be accessed by a right mouse button click if the app is programmed for it.

The "Alt Gr" is simply an alt key, depending on the keyboard mapping.

https://en.wikipedia.org/wiki/Keyboard_layout

My previously used HP keyboard has two "alt" keys, no "Alt Gr."

In Windows the alt keys can trigger the app's main menu.

The WM_SYSKEYDOWN Win32 API message gives more detail how Windows processes alt and ctrl keys.

https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-syskeydown

Notice there are three virtual key code dealing with menus: VK_MENU, VK_LMENU and VK_RMENU.
Last edited on
VK_RMENU 0xA5. Usually mapped to a pop-up menu that can alternately be accessed by a right mouse button click if the app is programmed for it.
Exactly that one, the one to the left of the right Ctrl key in here: https://en.wikipedia.org/wiki/Keyboard_layout#/media/File:Physical_keyboard_layouts_comparison_ANSI_ISO_KS_ABNT_JIS.png
It is marked "Menu" but VK_MENU is the Alt key. VK_RMENU/0xA5 you said? I'll try it.

BTW, in this layouts the Return key is marked "Return", the photo linkted in the OP markes it "Enter", also the one in the numeric keypad. So it's hard to explain someone the difference between Enter and Return.

Edit: following extension:

I tried it with ooDialog (an supplement of ooREXX), but with a pop-up menu defined together with the right mouse button also this "Menu" key is activated by some user-friendly automatism I guess. So I installed Carnac https://github.com/Code52/carnac/releases/tag/2.2.155 -- which tells me, this "Menu" key to be Apps.
VK_APPS/0x5D, Applications key.

Found it (p. 1381 of 1872):
The event handler for the context menu event is invoked when the user right-mouse clicks on a window, types SHIFT-F10 on the keyboard, or types the VK_APPS key on the keyboard. The VK_APPS key is the Applications key on a Natural keyboard.
Last edited on
Topic archived. No new replies allowed.