Windows does not natively support adding a second single-action hotkey, meaning, you cannot create doing an open with 2 with just one hotkey press.
It is possible to do this with a few hotkeys though.
If your keyboard has the context menu button (usually on the bottom right of your keyboard near the alt and control keys) you can press that one to access the menu. If you do not have it, the altnernative shortcut key is CTRL-SHIFT-F10.
Once the menu is open, you'll see that the Open with has a small line below the h. This means, pressing the h
key will open the Open With
sub-menu. From there, pressing enter and arrow keys will allow you to open that particular file completely from the keyboard.
There are programs such as auto-hotkey which are macro based, which will allow you to perform an action based on a keypress, and some gaming keyboards also have macro keys build-in, which can be used to perform these keypresses and map it to a single key.
Alternatively, you can hack into the registry, and create a shortcut directly in the main sub-menu, but again, you cannot make this shortcut launch with a single shortcut key. But it would then be for example CTRL-SHIFT-F10, down arrow, down arrow, down arror, enter
The following registry hack will apply to every single file, nut just one type. It is possible to do it for one type too, but given that this section in the registry is a bit more complex, I've decided its not suitable for SuperUser because it takes too much explaining to do with all the possible ways it can be configured (and it is likely to break that fileformat if done improperly)
In the registry, go to HK_CLASSES_ROOT\*\shell
and export this key so you have a backup in case things stop working as expected.
Create a new key. The name you give this key will be the name it will show in your context menu. Although you can write an & before a letter to underline it, unfortunately windows does not make that key a shortcut key. To write a & as real text, write &&. For this example, I'll be using _My Command
and reference to it.
The next step is optional. If you'd like to add a 16x16 icon to respresent this function, you can add a String Value
with Name
: Icon
, and Data
: C:\path\to\file.ico
where this path is any existing location of a .ico file.
Now, create a new sub-key to your _My Command
key, and name it Command
. Click it, and on the right, change thet default value to: "C:\path\to\my\program.exe" "%1"
. The program.exe can also be a .cmd file or anything else that executes. The %1 is a reference to the file you clicked. If for example the program you use requires more parameters to load your file, for example the file you want to open is c:\myfile.txt and the commandline would be: c:\test.exe -file c:\myfile.txt
, then the default value would become: "C:\test.exe" -file "%1"
Keep in mind, that all changes to this subkey are instant changes, meaning that you can switch to your explorer, and right-click and instantly see the results. If for some reason you did not do it correctly, explorer may crash. So don't test until every step was done. Also, don't close regedit until you have confirmed that it works. If it doesn't work instantly, you need to reboot. So far I have one instance where this was required, but most of the time, these changes were instantly.