@pbarney said in Virtual Key Codes Update:
It mentions a “complete list” which can be found on the repo at keys.h , but that file is far from complete.
Good point. That phraseology was left over from the pre-2017 wiki-based manual, which was known to be out-of-date and innacurate, but it was a monumental task to update that, and some things weren’t always reworded in the best manner.
The modern User Manual does, however, also point to a few posts here, which in turn lead to our FAQ: FAQ: List of Notepad++ key combinations, available for shortcuts. I should remove the word “complete” from the UM, and point directly to the FAQ. However, you might want to double check your list against the FAQ, to let us know if the FAQ is missing any.
Please note that many in your table, like the VK_GAMEPAD*, are technically “reserved” in the official list, and are dependent on Windows keyboard settings and localization
A more-complete list is found in namedKeyArray[] in shortcut.cpp – in that, that is the list that modern Notepad++ now uses when generating the list of available keys in Shortcuts (and it uses win32 API calls to ensure that for reserved and oem-specific keycodes, it provides the right name based on your current Windows keyboard settings) – so it’s a complete list of what Notepad++ actually allows via the GUI.
update: https://npp-user-manual.org/docs/config-files/#virtual-key-number has been updated to stop calling keys.h “complete”; it now links to a section of the codebase in shortcut.cpp that lists all the keycodes available to the Shortcut Mapper GUI, and links to the official MS documentation. Also, the text links to the FAQ rather than the individual posts for finding keycodes. And it explains how to use calc.exe to convert the hex listed in the source code or the MS docs into decimal for use in the key="###" attributes in shortcuts.xml.