Odd behaviour when completing a link with pipe alias

What I’m trying to do

Hi, I am trying to use a shortcut stored on my keyboard (Ultimate Hacking Keyboard, UHK). The shortcut (macro) is [[|]] with the cursor then moved to the left of the pipe, ready to populate with a file name and then an alias. So the macro works fine, supplying me with this text. But then when I select an existing file as the file name to the right of the pipe, it (Obsidian) deletes the pipe. What I would like it to do is simply give me the file name and let me move the cursor to the left of the pipe so I can choose the alias.

I get the same behaviour if I just type the [[|]] so I don’t believe the keyboard is inserting any extra formatting.

Does anyone have ideas as to how I can achieve this?

Indeed, it is not your keyboard macro. It is how it currently works. Note that when something follows the |, evan a single character, then it is preserved.

For now, you will be better of removing the pipe from your macro.

  • Have your macro move the cursor behind the opening braces ([[)
  • After selecting your note, it takes one single | instead of a single , to indicate to Obsidian you want to insert an alias.

So you do not gain key presses trying to automate by inserting the pipe symbol.

In the end, even your entire automation process is rather superfluous here. Obsidian is designed to make entering links as frictionless as possible. All it takes is a double [[ to automatically have your pair code [[]] with the cursor properly located.

Thank you vanadium. I guess the best process is no process.