MacOS menubar application to quickly switch between Apple Magic Keyboard, Magic Mouse and Magic Trackpad on multiple Macs https://gyptazy.com/blog/akeyboardswitcher/
  • Swift 97.7%
  • Shell 2.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-11 20:08:06 +02:00
.github/workflows Add pipeline job 2026-10-11 18:30:39 +02:00
Resources Add logo 2026-10-10 22:26:23 +02:00
Sources/AKeyboardSwitcher Add hotkey and device grouping 2026-10-11 20:08:06 +02:00
.gitignore Add gitignore to ignore build dirs 2026-10-10 22:04:59 +02:00
build-app.sh Add logo 2026-10-10 22:26:23 +02:00
LICENSE Initial commit 2026-10-10 21:59:43 +02:00
Package.swift initial commit of aKeyboarsSwitcher 2026-10-10 22:04:14 +02:00
README.md Add hotkey and device grouping 2026-10-11 20:08:06 +02:00

AKeyboardSwitcher

Build

AKeyboardSwitcher logo

A macOS menu bar app for quickly moving paired Apple Magic Keyboard, Mouse and Trackpad between Macs.

Motivation

Working from my home office, I share a single Apple Magic Keyboard and Magic Mouse between my corporate Mac and my personal Mac. Until now, the easiest way to switch the active device was to plug in the cable on the Mac that should take over the keyboard and mouse. With AKeyboardSwitcher this gets much easier: you simply need to click :)

Screenshot

AKeyboardSwitcher screenshot

For quick changes, you can also group multiple devices together that can be connected or released (even by hotkeys).

AKeyboardSwitcher device groups screenshot

Features

  • Overview of all or only connected devices
  • Quickly connect/release single Bluetooth devices
  • Group devices together to quickly connect/release them
  • Hotkey support

Build

Requires macOS 13+ and the Swift toolchain (Command Line Tools are enough).

./build-app.sh
open build/AKeyboardSwitcher.app

On first launch macOS asks for Bluetooth permission. Allow it.

Usage

Click the keyboard icon in the menu bar to see your paired input devices:

  • Connect: connect the device to this Mac.
  • Release: disconnect the device from this Mac so another Mac can take it.
  • Connect All / Release All: do the same for every listed device.
  • Show all paired devices: also list non-input devices (headphones etc.).
  • Options…: set up a device group and global hotkeys (see below).

Device group and hotkeys

In Options… you can give your group a name and select the devices that belong to it, e.g. your Magic Keyboard and Magic Mouse. The group then shows up in the menu with its own Connect and Release buttons, and can be switched from anywhere with these global hotkeys:

Hotkey Action
⌘ Command + ⌥ Option + C Connect all devices in the group
⌘ Command + ⌥ Option + R Release all devices in the group

The hotkeys can be turned off in Options…. While they're on, they take priority over the same shortcuts in other apps (e.g. Finder's "Copy as Pathname"). If another app already reserved them, Options shows a warning.

A Bluetooth keyboard, mouse or trackpad can only be connected to one host at a time. To move a device, run the app on both Macs. Press Release on the Mac that has the device, then Connect on the Mac that should get it.