Show and hide an on-screen keyboard from the Shortcuts app
The Shortcuts app on a Mac can show and hide the Typebar keyboard overlay with three of its actions: Show Typebar, Hide Typebar and Toggle Typebar. Typebar adds seven actions in all; the other four set a theme, set a profile, show a layer, and turn Click to Type on or off. Put them in a shortcut next to the Mac’s own actions, such as Set Focus, and one run from Spotlight gets your screen ready to record or present.
If the on-screen keyboard you have in mind is the one built into macOS, the Accessibility Keyboard, that one lives in System Settings > Accessibility > Keyboard. The macOS Accessibility Keyboard and when an overlay suits you better explains how the two differ.
The seven Typebar actions
| Action | What it does |
|---|---|
| Show Typebar | Shows the overlay |
| Hide Typebar | Hides it |
| Toggle Typebar | Shows it if hidden, hides it if showing |
| Set Theme | Switches the board to another theme |
| Set Profile | Switches to a profile, such as Recording or Presenting |
| Show Layer | Shows one of your layers on the keys for a few seconds (5 unless you change it) |
| Turn Click to Type On or Off | Lets you type by clicking keys on the board |
To find them, open a shortcut in the Shortcuts app and type Typebar in the search field of the action list on the right.
Like the rest of Typebar’s automation, these change what the board shows. They never type or press keys for you. Even with Click to Type turned on, a key is typed only when you click it on the board yourself.
Build a show and hide shortcut
The simplest useful shortcut is one action long.
- Open the Shortcuts app and choose File > New Shortcut, or press Command-N (⌘N).
- Give it a name you will type later, such as “Keys on screen”. The name sits at the top of the editor.
- Search the action list for Typebar and drag Toggle Typebar into the shortcut.
- Close the window. Shortcuts saves as you go.
To be fair to the built-in route: for showing and hiding alone, Typebar’s own shortcut is quicker. Control-Option-Command-K (⌃⌥⌘K) shows or hides the overlay, and so does a triple tap of fn. The Shortcuts app pays off when one run should do several things at once, which is where the next sections go.
Ways to run a shortcut on a Mac
Once a shortcut exists, macOS gives you plenty of ways to start it:
- Spotlight. Press Command-Space, type the shortcut’s name, and press Return.
- A keyboard shortcut. In the shortcut’s window, open Shortcut Details from the toolbar, and in Details click Add Keyboard Shortcut.
- The menu bar. In the same Details panel, turn on Pin in Menu Bar, and the shortcut appears under the Shortcuts icon in the menu bar.
- Siri. Say the shortcut’s name.
- Terminal or a script. macOS includes a
shortcutscommand, soshortcuts run "Keys on screen"runs it from anywhere a shell command runs.
Spotlight is the one to remember. It needs no setup, and a clear name such as “Start recording” is easy to type with your eyes on the script you are about to read.
A “start recording” shortcut
This is the shortcut that earns the setup. One run silences notifications, sets up the overlay and shows it.
- Set Focus, set to turn Do Not Disturb on. This is a built-in macOS action, so banners stay out of the take.
- Set Profile, set to Recording. The overlay takes the look, mode, size, place, pill, mouse effects and sounds you saved in that profile.
- Show Typebar.
Run it from Spotlight, then press Command-Shift-5 (⇧⌘5) and start recording as usual.
Make a matching “Stop recording” shortcut with Hide Typebar and a Set Focus action that turns Do Not Disturb off. Two names, one for each end of a session.
There is another way to handle the showing and hiding. In Settings > Recording, “Show when a screen recording starts” makes the overlay appear while your screen is recorded or shared and hide again when it stops. With that on, the start shortcut only needs Set Focus and Set Profile. Make a keystroke overlay appear only while you record covers that setting.
A “teach” shortcut and a lesson shortcut
The same pattern works for presenting:
- Set Profile, set to Presenting.
- Show Typebar.
- Turn Click to Type On or Off, set to on, if you will present with only a pointer and want to type by clicking the board. Presenting with only a mouse explains how that works.
For a lesson about a few particular keys, add Show Layer. Make the layer once in Typebar’s Settings, in the Layers pane, with arrows or symbols on the keys the lesson is about. A shortcut called “Vim lesson” can then switch the profile, show the board and put that layer on the keys in one go. Show Layer has a Seconds setting, 5 unless you change it, so raise it for a longer explanation. The layer’s keys only show: nothing on it is typed or pressed.
And if you already use typebar:// links, the Shortcuts app can send those too, with its Open URLs action or a Run Shell Script action (for that one, turn on Allow Running Scripts in the Shortcuts app’s settings, under Advanced). Control a keyboard overlay from Raycast, Alfred or a script lists the links.
Focus, and running shortcuts by themselves
On macOS 14 Sonoma and macOS 15 Sequoia, the Shortcuts app on the Mac has no automations. Turning on a Focus cannot start a shortcut by itself there, and neither can opening an app. Work the other way round: let the shortcut turn on the Focus, as in the “start recording” example, so one action from you sets both.
macOS 26 Tahoe brought automations to Shortcuts on the Mac, so a shortcut can run by itself when something happens. The triggers on offer depend on your version of macOS, so check the list in the app before you plan around one.
Typebar has its own switch for the most common case. A profile’s “Switch when these apps are in front” rules, in Settings > Profiles, change the overlay when Keynote, Final Cut Pro or any app you choose comes to the front, with no shortcut at all.
Typebar is $9 once for up to 5 Macs, with a free 24-hour trial and no card.
Questions
Can a shortcut make Typebar type something?
No. The actions change what the board shows. Turning Click to Type on lets you type by clicking keys on the board, but the clicking is yours.
Do I need the Shortcuts app just to show and hide the overlay?
No. Control-Option-Command-K (⌃⌥⌘K) or a triple tap of fn does that. Use Shortcuts when one run should also set a Focus, a profile or a layer.
Do the actions work after the trial ends?
After the 24-hour trial, Typebar does nothing until you buy it or enter a license key, so each action stops with a message instead of running. Your settings, themes and layers are kept, and entering a key brings everything back.