'Visual Studio Code make a keybind for a right-click menu button
For example, in VS Code, I can right click on a variable, select Peek > Peek Type Definition.
How can I make a keybinding for this (currently there is no keybinding set)? How can I even find the appropriate command for the keybindings.json file, if the "Peek Type Definition" button is not mapped to anything?
Solution 1:[1]
When you right click, the window that pops up is called the context menu. Some keyboards have a context menu button. Unfortunately, VSCode does not use this as the command in the keyboard shortcuts, so there is no way to do this through the keyboard shortcuts menu.
Alternatively, you could use SharpKeys, a utility that lets you remap keys on your keyboard. Personally, I have my right alt key mapped to the context menu button. In SharpKeys, the context menu button does not have a name, so it is just called Special: Application (E0_5D). This allows you to right click from the keyboard.
In the screenshot below, you can see the remap in the highlighted section.

Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nathan Dai |
