How to open files in a particular app with keyboard?

Does anyone know how I can set a keyboard shortcut to open a selected file in a particular application? For example, how can I have .html files set to open in a text editor by default, but set a keyboard shortcut to open one in Firefox if it's selected?

I'm using the Nautilus file manager in GNOME 48 on Debian 13

15 points · 2 comments · view on lemmy.world

2 Comments

infeeeee@lemmy.zip · 10 pts · 214d

You can create scripts in Nautilus which adds options to the rightclick menu, then you can assign keybinds to them: https://wiki.archlinux.org/title/GNOME/Files#Custom_scripts This is Arch wiki, but this applies to all distros

CallMeAl@piefed.zip · 4 pts · 214d

If the file is already selected you can do this from the keyboard:
SHIFT+F10 -> h -> ARROW KEYS (to highlight Firefox) -> ENTER