question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: Keyboard shortcut or programmatic way to open file in specific app

See original GitHub issue

What 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:

  1. A COM object will allow programmatic interaction with Files OR
  2. 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:open
  • Created 7 months ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cinqmilleanscommented, Feb 20, 2023

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.

0reactions
yaira2commented, Feb 20, 2023

@cinqmilleans do you think we can support this with custom actions?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I create a keyboard shortcut to open a file in ...
Right-click on the program you want to open the file in and select "Properties". · In the Properties window, select the "Shortcut" tab....
Read more >
Shortcut Key to Open file with non- default programs?
To open a dropdown along with the Open With.. menu for a selected file, the keyboard shortcut is: Shift + F10 + H....
Read more >
2 Ways to Open a Program/App with Keyboard Shortcut ...
One way to run Windows apps with a keyboard shortcut is to pin the app to the taskbar. You can click Start Menu...
Read more >
How to run a Windows app or program with a keyboard shortcut
Regardless of whether you're using Windows 10 or Windows 7, right-click on the app's shortcut from your Start Menu, desktop, or anywhere else...
Read more >
Open programs with keyboard shortcuts in Windows 10
Open programs with keyboard shortcuts in Windows 10 · 1. Open the Start menu/screen, and click All apps. · 2. Find the app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found