We check if the filename ends in pdf (case insensitive match - looking for pdf in the end of the string).We do a Ctrl+C (by Send ^c) to get the file name This assumes that you have selected a file by clicking on it once using the mouse.Setup a hotkey: >^x:: - this sets up a hotkey for Right (>) Ctrl (^) and (x).SplitPath, clipboard, name, dir, ext, name_no_ext, drive So, I wrote a autohotkey script that does the following Right Ctrl + x will open a pdf file in Xodo pdf annotation toolĬlipWait waits for the clipboard to have content Xodo docs happens to be a new metro style 'modern' Windows Desktop App - that cannot be run from a command line giving a filename as a parameter to open it. I had this same problem where I use an application called Xodo Docs to write notes in (using a wacom tablet) and annotate PDF files which I am studying, however for all other purposes I want to use Acrobat Reader. So far I have one instance where this was required, but most of the time, these changes were instantly. If it doesn't work instantly, you need to reboot. Also, don't close regedit until you have confirmed that it works. If for some reason you did not do it correctly, explorer may crash. 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 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"
![keyboard shortcut opens windows 10 settings keyboard shortcut opens windows 10 settings](https://i.ytimg.com/vi/HJTugjLX228/maxresdefault.jpg)
The %1 is a reference to the file you clicked. Click it, and on the right, change thet default value to: "C:\path\to\my\program.exe" "%1". Now, create a new sub-key to your _My Command key, and name it Command. 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. For this example, I'll be using _My Command and reference to it. Although you can write an & before a letter to underline it, unfortunately windows does not make that key a shortcut key.
![keyboard shortcut opens windows 10 settings keyboard shortcut opens windows 10 settings](https://i.ytimg.com/vi/uQQhcR1bPkg/maxresdefault.jpg)
The name you give this key will be the name it will show in your context menu. 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.Ĭreate a new key. 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) The following registry hack will apply to every single file, nut just one type. But it would then be for example CTRL-SHIFT-F10, down arrow, down arrow, down arror, enter 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.Īlternatively, 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. From there, pressing enter and arrow keys will allow you to open that particular file completely from the keyboard. This means, pressing the h key will open the Open With sub-menu. Once the menu is open, you'll see that the Open with has a small line below the h. If you do not have it, the altnernative shortcut key is CTRL- SHIFT- F10. 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.
![keyboard shortcut opens windows 10 settings keyboard shortcut opens windows 10 settings](https://i.pinimg.com/736x/32/04/62/320462748e913f005519a2fdc66a8917.jpg)
![keyboard shortcut opens windows 10 settings keyboard shortcut opens windows 10 settings](https://www.minitool.com/images/uploads/news/2021/03/how-to-open-windows-10-settings/how-to-open-windows-10-settings-3.jpg)
It is possible to do this with a few hotkeys though. 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.