Opening another vault with keyboard only?

I would like to open another vault using my keyboard only, no mouse. I’m on a Mac.

Right now, I have defined a keyboard shortcut to “open another vault” (cmd-option-P), and this opens a modal window for choosing another vault. But once in this modal window, how do I select another vault using my keyboard only?

Right now, I have to use my mouse to select another vault.

Ideally, the first vault would be selected already, and I would just need to hit enter, or use the arrow keys to select another one.

Things I have tried

I tried using Tab, but this doesn’t select the other vaults. It only switches between the three buttons and the dropdown menu in the modal window.

I tried typing the first letter of the other vault, and using arrow keys. Doesn’t work either.

What I’m trying to do

If you’re willing to use other software, something like Keyboard Maestro (KM) would let you achieve this easily via Obsidian’s URL scheme.

https://www.keyboardmaestro.com/main/

https://help.obsidian.md/Advanced+topics/Using+obsidian+URI

Set up a macro in KM to open an Obsidian URL, then trigger it with your desired keyboard shortcut.

2 Likes

There are related feature requests to support navigation in the app with keyboard. This seems like a relevant point to add to the discussion there, if vault-switching wasn’t already mentioned there.

Yeah it would be nice to be able to just type a vault name right in the command, like Quick Switcher. This could be an interesting feature request for GitHub - darlal/obsidian-switcher-plus: Enhanced Quick Switcher plugin for Obsidian.md too, maybe?

1 Like

Thanks for the suggestion. I’m not using Keyboard Maestro (or Alfred). Inspired by the idea, I did try a work-around using built-in Mac apps:

  1. creating an Automator service to launch an Obsidian vault - this works: Automator > new service; add block Get specified URL, select “no input”, “any application”, add the obsidian url (in my case obsidian://open?vault=Notes), add block Display webpages, save.
  2. adding a shortcut to this service, in mac preferences > keyboard > shortcuts > services. This almost works - The shortcut works when I’m in Finder, or in Firefox, but not when I’m in Obsidian itself… so close… I suppose this is because Obsidian (Electron) ignores mac services.
1 Like

@rigmarole Yes, it seems to be a more general problem.

I added a feature request to Switcher-plus. Thanks.

Hello @samueldee!

Take a look at the plugin Shell Commands from the fantastic @jare.

You can create a command to open this Obsidian URI and define a hotkey

  • open “obsidian://open?vault=Notes”

This way you can open a vault inside Obsidian using the keyboard.

I hope it helps!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.