Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Opt/Alt + Click as Trigger #53

Open
julroger2013 opened this issue Sep 8, 2023 · 2 comments
Open

[Suggestion] Opt/Alt + Click as Trigger #53

julroger2013 opened this issue Sep 8, 2023 · 2 comments

Comments

@julroger2013
Copy link

This plugin is amazing! It makes Obsidian considerably more viable as sort of a file manager, which is great for me in a profession where I have to deal with many, many .docx and .pdf files.

I have one suggestion. I think the plugin may be even more useful if Opt/Alt + Click were a possible trigger for opening in the system viewer/default app.

The reason for this suggestion is that Obsidian's default preview plugin allows either a simple hover or hover + cmd/ctrl to prompt the preview popup. Thus, I'm often triggering a popup preview when hovering over a file name in the File Explorer with the aim of opening the relevant file in the default app.

If it were possible to use opt/alt + click to open in the default app, instead of cmd/ctrl + click, it would be easier to open a file without always bringing up a preview along the way.

Thanks again for making this! It's really great—so much so that it would be a great fit as a default functionality for Obsidian.

@lukemt
Copy link
Contributor

lukemt commented Sep 13, 2023

Hi @julroger2013

Thank you for the kind words. Yes I even want to remove/invert the functionality as I have described here: #46

Using alt+click would be a fantastic implementation for this and I even thought about this too. The twofold problem I had was that alt+click already has another meaning: it adds a new curet (so you can actually type with multiple curets) this means we would partially break this functionality (who uses this anyways? and if it only happens when you click on a non-md-file-link this should be fine IMO). Unfortunately it also means that it is harder to implement because the openFile() function won’t be called (because they just add a curet). I think it should be possible to implement this somehow: For example by attaching a click listener for links and then reading the link and then calling the defaultApp function. So I will experiment a little with this as I do prefer this solution over any other too!

Thank you for bringing it up and posting the suggestion!

@lukemt
Copy link
Contributor

lukemt commented Sep 15, 2023

Yeah apparently I have no idea on how to implement this as there isn't enough information attached to the html-elements that I could use to follow the links. If anyone has an idea, please share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants