Skip to content

ForkHorizon/FnSwitcher

Repository files navigation

FnSwitcher

FnSwitcher is a macOS menu bar utility that makes switching keyboard input sources with the Globe/Fn key reliable.

macOS can sometimes miss the first Globe/Fn press when switching languages, requiring a second or third press. This app listens for a standalone Globe/Fn key press, suppresses the unreliable default handling, and switches directly to the next enabled keyboard input source.

Status

Public utility release. The app is usable, but the repository still uses the original Xcode project name AppleLocalizationSwitcher internally.

Install

Download the latest DMG from the GitHub release:

FnSwitcher 1.7

DMG SHA-256:

18888f966c964f93823e091e969429911ccec59d19e1d6dfecddc7791e60196f

Open the DMG, drag FnSwitcher.app into Applications, then launch it.

Permissions

The app requires macOS Accessibility and Input Monitoring permissions so it can catch the Globe/Fn key globally. When the Fn switcher is enabled, the app requests missing permissions on launch.

On first run, use Request Keyboard Permissions from the menu bar item if macOS does not show the prompts automatically. Then enable FnSwitcher in:

System Settings -> Privacy & Security -> Accessibility

and:

System Settings -> Privacy & Security -> Input Monitoring

Usage

  • The app runs only in the menu bar.
  • Reopening the app while it is already running exits the duplicate instance and keeps a single menu bar item.
  • Press Globe/Fn once to switch to the next enabled keyboard input source.
  • Use Switch Target to choose between switching the Mac input source, sending the legacy iPad Universal Control shortcut with CGEvent, or sending the iPad shortcut through Karabiner VirtualHID.
  • In iPad Universal Control mode, Globe/Fn sends Control-Space to the current Universal Control keyboard target instead of changing the Mac input source directly.
  • In iPad Virtual HID (Karabiner) mode, Globe/Fn asks a sudo bridge helper to send Control-Space through Karabiner's DriverKit virtual keyboard. This is a proof-first mode for testing whether Universal Control forwards hardware-like virtual HID reports to iPad.
  • The selected language is shown in a centered macOS-style glass HUD after manual switches.
  • Use Request Keyboard Permissions if the menu shows Keyboard permissions required.
  • Use Switch Now from the menu to switch manually.
  • Use Enable Fn Switcher to turn the key handling on or off.
  • Use Settings to enable language layout persistence globally and per application.
  • Use Launch at Login to start the utility automatically after login.
  • Use Copy Diagnostics if Globe/Fn does not behave reliably; it copies monitor and permission state.
  • If fewer than two selectable keyboard input sources are enabled, the app shows a disabled status and lets Globe/Fn pass through.

Karabiner Virtual HID Prototype

The Karabiner mode is an experimental FnSwitcher 1.7 prototype. It requires Karabiner's VirtualHIDDevice driver and a manually started root helper.

  1. Install Karabiner-Elements or Karabiner VirtualHIDDevice, then approve/activate the DriverKit extension in macOS settings.
  2. Build the helper target:
xcodebuild -project AppleLocalizationSwitcher.xcodeproj -target FnSwitcherKarabinerBridge -configuration Debug build
  1. Run the helper with sudo:
BRIDGE="$(xcodebuild -project AppleLocalizationSwitcher.xcodeproj -target FnSwitcherKarabinerBridge -configuration Debug -showBuildSettings | awk -F'= ' '/ BUILT_PRODUCTS_DIR =/{print $2; exit}')/FnSwitcherKarabinerBridge"
sudo "$BRIDGE"
  1. Select iPad Virtual HID (Karabiner) in FnSwitcher.

Use Copy Karabiner Setup Commands from the menu to copy these commands, and Copy Diagnostics to include the active target mode, bridge status, and last bridge error.

Build

Build from source with Xcode or:

xcodebuild -project AppleLocalizationSwitcher.xcodeproj -scheme AppleLocalizationSwitcher -configuration Release build

The app is intended as a local macOS utility and is not sandboxed, because global keyboard event handling requires system-level permission.

License

No open-source license has been declared yet. Until a license file is added, the public source should be treated as visible reference code rather than reusable licensed software.

About

macOS menu bar utility for reliable Globe/Fn keyboard input-source switching.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors