Feature: Keyboard shortcut or programmatic way to open file in specific app
See original GitHub issueWhat feature or improvement do you think would benefit Files?
As part of my workflow, I have a macropad with buttons dedicated to open files I’ve selected in Explorer in the app of my choosing. This is accomplished by AutoHotkey tapping into the COM interface to get the paths of selected files. In PowerShell, a simplified version of this would look like (New-Object -ComObject Shell.Application).Windows()[0].Document.SelectedItems() | Select-Object Path
(gets path of first selected item in first open Explorer window).
I have no idea if this is a realistic request, but would it be possible to register a COM object to allow programmatic interaction with Files? Alternatively, it would accomplish my current goals to have customizable keyboard shortcuts for “Open selected file(s) with ____ application”.
My knowledge of the Windows APIs is pretty limited, so it’s possible that there’s already a way to do this?
Requirements
Either:
- A COM object will allow programmatic interaction with Files OR
- A keyboard shortcut will open selected file(s) with the specified .exe
Files Version
2.4.33.0
Windows Version
10.0.22621.1265
Comments
No response
Issue Analytics
- State:
- Created 7 months ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
This is something that will be very easy to do with actions. In a next iteration, there will be a mechanism to add/remove custom actions in CommandManager. It will be enough to create an Action class, instantiate it with the parameters (software, hotkey, …), add it to the commands and the shortcut will work. It will be necessary to provide a repository to store custom hotkeys and actions, but it is an overlay to CommandManager.
@cinqmilleans do you think we can support this with custom actions?