Keyboard action to start typing wiki link

I want to make a keyboard action bar button which enters double square brackets, leaves the cursor between them, and starts the autocomplete process.

I’m a bit lost for how to do this, since Insert Text actions neither seem to let you position the cursor (it always winds up at the end of the insertion) nor trigger completion.

Is this possible?

That is not possible. Auto-complete can only be triggered by actual typing of the triggering characters. You can use an action built to insert a link to another draft instead.

If you’re feeling brave and what you really want is say to make this easier to type on ios, you can create your own syntax. The easiest way to do this is copy your default syntax and edit that. Copy the default double bracket autocomplete definition and change the trigger to something else. In my case it’s , since I’m typing it on an ipad, but just pick something you’re not likely to type by accident, :smiling_face:.

There are disadvantages to this, obviously. When updates happen that involve syntaxes you’ll have to do this again to take advantage of them. You’ll have to change your default syntax to yours. But I’ve had this setup practically since autocomplete was created and it’s not too annoying if you don’t mind tinkering.

1 Like