deathau / sliding-panes-obsidian

Andy Matuschak Mode as a plugin
747 stars 29 forks source link

Support alt + enter shortcut to open new pane #86

Open Kongolan opened 2 years ago

Kongolan commented 2 years ago

Problem Currently only the use of ctrl + click works for opening a new sliding pane.

But when you use alt + enter (on windows), which does open a link just with the keyboard and no mouse, it doesn't work.

How it should work With the cursor at a link, hitting alt + enter opens a new sliding pane instead of opening the link in the active pane!

I hope this can be implemented fast, because I literally use the keyboard more often than the mouse.

Kongolan commented 2 years ago

After some more research, this issue might be related to the problems with the new preview mode, also mentioned in #78. Obviously I can only use alt + enter when I'm editing a line, so this is bound to preview mode. I also tried to listen for the active-leaf-change event and call your file handler with it, but due to preview mode issues, it did not work yet.