So I just created a file on my desktop with a new extension, and this is what its context menu looks like:
I can bring up the context menu with the menu key on my keyboard, and I can actually select some of the items in the context menu by pressing keys after that. Naturally, this gives me the opportunity to create some keyboard shortcuts. However, I don't quite understand how they work. Take the following example.
If I create a file called "item.newextension" and then import the following registry file:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations\.newextension\shell\Edit\command] @="notepad.exe \"%1\"" [HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations\.newextension\shell\Contemplate\command] @="mspaint.exe \"%1\""
I get some inconsistent and interesting results. To be on the same page, now my context menu looks like this:
If I open the context menu and press the key "e", notepad opens up immediately. Also, if I open the context menu and press the key "c", the context menu flips between "contemplate" and "copy," but does not choose either until I press enter.
So I realize that, if you look closely, there is a little line under each letter in the context menu entry that corresponds to what key needs to be pressed to select it, and when there's overlap, pressing that key repeatedly toggles between the two. So I have a few questions:
- When I create my own context menu entries, as I did in the .reg file, how do I select which key is responsible for selecting that entry?
- Can I change existing keyboard shortcuts for things like "Create shortcut" and "Copy," or will they always have to be "s" and "c" respectively?
I am on Windows 10 1803 Build 17134 for reference.