Skip to main content
Automation6 min readUpdated 2026-11-27

How to Switch Your Magic Keyboard, Mouse, and Trackpad With One Hotkey Using Apple Shortcuts

Step-by-step guide to automating Magic Switch with native Apple Shortcuts actions (Toggle All Magic Devices, Toggle Magic Keyboard, Mouse, and Trackpad), global hotkeys, Stream Deck, and Shortery.

Quick Answer

Magic Switch includes native Apple Shortcuts actions on macOS: Toggle All Magic Devices, Toggle Magic Keyboard, Toggle Magic Mouse, and Toggle Magic Trackpad. Open the Apple Shortcuts app, create a new shortcut with Toggle All Magic Devices, and assign a keyboard shortcut in Shortcut Details (for example Control + Option + Command + S). You can also trigger that exact shortcut from an Elgato Stream Deck, Raycast, Alfred, or Shortery automation.

Key Takeaways

  • Magic Switch exposes four native Apple Shortcuts actions out of the box: Toggle All Magic Devices, Toggle Magic Keyboard, Toggle Magic Mouse, and Toggle Magic Trackpad.
  • Assigning a global keyboard shortcut in Apple Shortcuts lets you switch all your Apple peripherals without touching the menu bar.
  • You can chain Magic Switch with monitor input switching (via BetterDisplay/CLI), Focus modes, or app launches inside a single Apple Shortcut.
  • Because it uses native macOS Shortcuts, it works immediately with Stream Deck, Raycast, Alfred, BetterTouchTool, and Shortery.

Magic Switch native Apple Shortcuts actions

Clicking the menu bar is already fast, but once you switch between two Macs ten times a day, a single keyboard shortcut or physical Stream Deck button feels effortless. Magic Switch registers native macOS App Intents directly with the Apple Shortcuts app, so you do not need fragile UI scripting or Accessibility workarounds.

Here are the four built-in Magic Switch actions available inside Apple Shortcuts.

Magic Switch native Apple Shortcuts actions
Apple Shortcuts ActionWhat It DoesBest Use Case
Toggle All Magic DevicesSwitches your Magic Keyboard, Magic Mouse, and Magic Trackpad together to your paired MacDaily one-hotkey desk switch between work and personal Macs
Toggle Magic KeyboardSwitches only your Apple Magic Keyboard (including Touch ID)When you use a third-party mouse and only need the keyboard to move
Toggle Magic MouseSwitches only your Apple Magic Mouse (2 or USB-C)Quickly moving just the mouse while keeping keyboard in place
Toggle Magic TrackpadSwitches only your Apple Magic Trackpad (2 or USB-C)Desk setups with a separate keyboard and a shared Magic Trackpad

Step-by-step: Bind a global hotkey in Apple Shortcuts

Setting up a global keyboard shortcut takes less than two minutes on macOS 12 Monterey through macOS 26 Tahoe.

  1. Open the built-in Apple Shortcuts app on Mac A (and repeat on Mac B if you want the same hotkey on both computers).
  2. Click the + button to create a new shortcut and name it something clear like Switch Magic Devices.
  3. In the right-hand Action Library, search for Magic Switch.
  4. Drag Toggle All Magic Devices into the shortcut editor (or pick Toggle Magic Keyboard / Mouse / Trackpad if you only want one peripheral).
  5. Click the Shortcut Details icon (the circle with an i in the top-right panel).
  6. Check Use as Quick Action and click Add Keyboard Shortcut. Press an unused combination such as Control + Option + Command + S.
  7. Close the editor. Pressing your hotkey from any app now triggers Magic Switch and moves your devices to your other Mac.

Pro tip: Set the exact same hotkey on both Macs

Create the same Apple Shortcut with the same keyboard combination (for example Control + Option + Command + S) on both Mac A and Mac B. That way, muscle memory works identically in both directions: press the same chord to jump from work to personal, and press it again to jump right back.

Power-user automations: Stream Deck, Raycast, and Shortery

Because Magic Switch speaks native Apple Shortcuts, any macOS launcher or hardware controller that can run a Shortcut can trigger a Bluetooth peripheral switch.

Elgato Stream Deck one-button switch

Install the macOS Shortcuts plugin in Stream Deck (or use a System > Open / Run Shell Script action calling: shortcuts run "Switch Magic Devices"). Put the button in the corner of your Stream Deck so one physical tap moves your Magic Keyboard, Mouse, and Trackpad between Macs.

Chain monitor input switching + peripheral switching

If you use a single monitor with a tool like BetterDisplay or m1ddc for DDC/CI input switching, add a Run Shell Script step inside the same Apple Shortcut right after Toggle All Magic Devices. One keystroke hands off your keyboard, mouse, and trackpad and flips your display to the other Mac.

Raycast and Alfred launchers

Raycast reads your Apple Shortcuts library natively. Open Raycast, type Switch Magic Devices, and optionally assign a dedicated Raycast alias or hotkey. Alfred users can trigger shortcuts run "Switch Magic Devices" from a simple one-node workflow.

Automatic triggers with Shortery

If you want context-based switching without pressing anything, apps like Shortery can trigger your Magic Switch Apple Shortcut automatically when a specific monitor connects, when a Focus mode changes, or when a specific app comes into focus.

Checklist for rock-solid hotkey switching

Before relying on an automated hotkey every day, verify these three details so every switch lands smoothly.

  • Make sure both Macs are awake when you trigger the shortcut. On desktop Macs like a Mac mini, enable 'Prevent automatic sleeping when the display is off'.
  • Pick a keyboard shortcut with three modifiers (such as Control + Option + Command + S) so it never collides with shortcuts inside VS Code, Figma, Xcode, or your browser.
  • If you only want your keyboard and trackpad to move while leaving a separate mouse untouched, chain Toggle Magic Keyboard and Toggle Magic Trackpad inside one shortcut instead of Toggle All Magic Devices.

Frequently Asked Questions

Does Magic Switch natively support Apple Shortcuts?

Yes. Magic Switch includes native Apple Shortcuts actions: Toggle All Magic Devices, Toggle Magic Keyboard, Toggle Magic Mouse, and Toggle Magic Trackpad.

Can I trigger Magic Switch from the command line or Stream Deck?

Yes. Once you create a shortcut in Apple Shortcuts (for example named Switch Magic Devices), any launcher, script, or Stream Deck button can run it using: shortcuts run "Switch Magic Devices".

Do I need a subscription to use Apple Shortcuts in Magic Switch?

No. Apple Shortcuts actions, Switch All Devices, Universal Switch, Clipboard Sync, and Smart Reconnect are all included in the single $14.99 one-time purchase.

Ready to switch your Magic devices in one click?

Magic Switch works with Magic Keyboard (including Touch ID), Magic Mouse (2 & USB-C), and Magic Trackpad (2 & USB-C) on macOS 11.0 Big Sur through macOS 26 Tahoe. $14.99 one-time for unlimited personal Macs, backed by a 7-day 100% full money-back guarantee.

Related Guides