Hotkey in Windows context menu

4

3

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?

celicni

Posted 2013-03-11T00:20:25.490

Reputation: 105

What happens if you press 'n'? Does the menu item get highlighted? – Karan – 2013-03-11T02:59:43.887

No, it doesn't. If I choose unused letter, context menu closes when I press hotkey. If I choose letter that is used by one other item, that item's command gets called, and if I choose letter used by multiple items, 'cursor' circulates between those items, but skips Notepad++ item. – celicni – 2013-03-11T08:49:50.620

Answers

1

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.

celicni

Posted 2013-03-11T00:20:25.490

Reputation: 105

You are correct, this is quite annoying. – jippyjoe4 – 2019-05-30T01:04:41.593

Yes, I know that it shouldn't be that way, but it appears to be in my case. I added:

HKEY_CLASSES_ROOT>*>shell>Edit with &Notepad++>command>c:\Program Files (x86)\Notepad++\notepad++.exe %1

Also, afterwards I noticed that in Windows Explorer there is (added by installation) an 'Edit with Notepad++' item, but it isn't present in Total Commander, where I experienced this situation. – celicni – 2013-03-11T23:02:13.127

Yeah, as I suspected, you added it wrong (hotkey doesn't work your way for me either). See my answer which works in Win Explorer. If Total Commander or other file manager behaves in a non-standard manner, that's its problem. – Karan – 2013-03-11T23:38:34.030

4

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

Karan

Posted 2013-03-11T00:20:25.490

Reputation: 51 857