Browse the docs

Quicklinks and keywords

Give any macro a one-word keyword in the palette, so "gh swift actors" opens a GitHub search; File > New Quicklink makes one in a sheet, and fallback searches appear when nothing matches.

A keyword is a word you type in the palette (⌥Space) that runs one particular macro, with the rest of the line handed to it. Type gh swift actors and press ⏎: the macro that owns gh runs with swift actors as its input, and your browser opens GitHub's search for it.

A quicklink is the smallest such macro: a keyword, an address and one Open URL step. Any macro can have a keyword, so quicklinks are not a separate kind of thing.

Choose File > New Quicklink… (⌥⇧⌘N). The sheet asks for:

  • Name: what the row is called. Left blank, it is "Search github.com" or "Open github.com".

  • Keyword: one word, such as gh.

  • Address: write {query} where what you type should go, for example https://github.com/search?q={query}. Without {query} the keyword simply opens the address.

  • Open in: the default browser, or an app you name.

  • Offer as a fallback search: on by default when the address has {query} (see below).

Save writes an ordinary macro in a Quicklinks group, with one Open URL step, a query input and a palette block. It is encoded for you: {query} becomes {{urlEncode(query)}}, so spaces and & in what you type are safe.

You can also type or paste an address into the palette when nothing else matches: a New Quicklink row appears beside Make a macro and opens the sheet with the address filled in.

Give any macro a keyword #

Select a macro with nothing selected inside it and look at the inspector's Palette section:

  • Keyword: one word. Case and accents don't matter.

  • Argument: None (the keyword just runs the macro), Optional (text after the keyword is handed over if there is any) or Required (Return with nothing typed opens the input form).

  • Hint: plain words shown under the macro's name, "search GitHub".

  • Offer as a fallback search: see below.

The text after the keyword goes to the macro's first text input. Other inputs that have no default are asked for in the palette's small form, with the argument already filled in.

In a macro file this is the palette field:

"palette": { "keyword": "gh", "argument": "required", "hint": "search GitHub", "fallback": false }

How the palette treats a keyword #

When the first word you type is a macro's keyword, that macro is the first row, with a subtitle that says what Return will do: "search GitHub ▸ type a query" until you add text, then "search GitHub for “swift actors”". Fuzzy matching on names keeps working underneath. Two macros with the same keyword: the one made last wins, and the inspector warns.

Fallback searches #

When what you typed matches no macro, app, menu item or other row, the palette shows a Search section before Make a macro: "Search Google for “how to rebase onto main”", one row per macro marked as a fallback. Return runs it with everything you typed.

The order, and which macros are offered, is in Settings › Palette, Fallback searches: drag to reorder, and a checkbox turns a search off. Switchboard comes with Search Google (g), Search Apple Maps (maps) and Search GitHub (gh); GitHub is not offered as a fallback until you turn it on, because not everyone searches GitHub.

See also #

Open URL, urlEncode, Fallback searches, Snippets