Hotkey in Windows context menu

I've added (in registry) an 'Open in Notepad++' item to my context menu in Windows 8 (for some reason, it is not added during the instalation).

I used the ampersand (&) to assign a hotkey, like this:

Edit with &Notepad++

and n is now indeed underlined in my context menu, but the hotkey doesn't work (even if I choose a hotkey that is not used by any other application). How can I fix this?


Solution 1:

Save the following as a .REG file and import into your registry to add an entry for Notepad++ to the context menu of all files:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\np]
@="Edit &with Notepad++"

[HKEY_CLASSES_ROOT\*\shell\np\command]
@="C:\\Program Files (x86)\\Notepad++\\Notepad++.exe \"%1\""

Save the following as a .REG file and import into your registry to add an entry for Notepad++ to the context menu of .TXT files only:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\txtfile\shell\np]
@="Edit &with Notepad++"

[HKEY_CLASSES_ROOT\txtfile\shell\np\command]
@="C:\\Program Files (x86)\\Notepad++\\Notepad++.exe \"%1\""

You can also use a program such as FileTypesMan if you don't like to edit the registry manually.

Result:

1

Solution 2:

Got it.

Hotkey is always the letter that item's title starts with. Ampersand makes the letter underlined, but it has no other effect.

If the title is 'Edit with Notepad++', then hotkey is 'e', and if I want 'n' to be hotkey, I need to rename it to 'N Edit with Notepad++' or 'Notepad++', and I don't need an ampersand.

This doesn't seem like a logic behaviour, it might be a bug, but that is how it works.