Skip to content

dwetscher/fnSwitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fnSwitch

fnSwitch

Flip your Mac's function keys from the menu bar — instantly. No restart, no logout, no fuss.

Download · How it works · Build from source

macOS 13+ · Apple Silicon & Intel · Signed & notarized · GPLv3


fnSwitch lives in your menu bar as a single fn key. Click it (or press - Cmd + Esc) to switch between using F1–F12 as standard function keys or as media / hardware keys — and the change takes effect the moment you click, without the restart macOS normally forces on you.

The menu-bar button

The icon always shows the current mode at a glance:

Outlined fn icon in the menu bar Outlined — media keys

The macOS default. F1–F12 control brightness, volume, Mission Control, and so on. Hold fn to reach the real F1–F12.
Filled fn icon in the menu bar Filled — standard function keys

F1–F12 send F1–F12 (great for IDEs, remapping, and apps that use the function row). Hold fn for the media keys.

Features

  • One-click toggle. Left-click the icon to flip modes instantly; the icon updates to match.
  • Global shortcut. Press (Cmd + Esc) from anywhere — no Accessibility permission required.
  • Always in sync. Change the setting in System Settings and the icon updates itself.
  • Launch at Login. Optional, from the right-click menu.
  • Invisible until you need it. Menu-bar only — no Dock icon, no window.
  • Tiny & native. A few hundred KB of Swift + AppKit. No background scripts, no login shells.

How it works

  1. Applies the change live by opening a parameter connection to IOHIDSystem (IOServiceOpen + kIOHIDParamConnectType) and setting the HIDFKeyMode parameter with IOHIDSetParameter — the same knob the driver responds to when System Settings changes it. It runs in-session, without root, on long-stable public IOKit that behaves consistently across macOS versions.
  2. Persists the com.apple.keyboard.fnState preference so the choice survives a reboot and keeps System Settings in sync, and posts the com.apple.keyboard.fnstatedidchange notification so everything else updates too.

Install

Download the latest .dmg (or .zip) from the Releases page, open it, and drag fnSwitch to Applications. Builds are signed with a Developer ID and notarized by Apple, so they open without Gatekeeper warnings.

Requires macOS 13 (Ventura) or later.

Build from source

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

…or open fnSwitch.xcodeproj in Xcode and hit Run. The app is a menu-bar–only agent (LSUIElement), so it has no Dock icon. Building requires Xcode 15 or later.

License

fnSwitch is free software licensed under the GNU General Public License v3.

Made with ❤️ in Austria 🇦🇹

About

Native macOS menu-bar app to instantly toggle Fn / function-key behavior

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors