Mac Fn/Ctrl Toggle
An Omarchy Quattro bar widget that toggles the Fn and left Ctrl roles on the
Apple internal keyboard using Linux's built-in hid_apple driver.
This plugin does not use keyd, xremap, or another remapping daemon. The
kernel parameter is /sys/module/hid_apple/parameters/swap_fn_leftctrl.
Setup
Run the setup once from this repository. It requires administrator permission because it installs a root-owned helper and a narrow sudoers rule:
sudo ./scripts/setup
sudo -n /usr/local/libexec/omarchy-mac-fn-ctrl status
The helper accepts only status, 0, and 1. The widget invokes it with
sudo -n, so missing setup never opens a password prompt from the bar.
Install from GitHub
After publishing this repository:
omarchy plugin add https://github.com/rafaelvzago/omarchy-mac-fn-key-plugin.git --enable
Run the setup command from the cloned plugin directory before using the bar toggle.
Usage
: normal mapping: Fn and left Ctrl are swapped?: setup is missing or the kernel parameter is unsupported
The selected keyboard mode is persisted through driver resets and reboots. Click the icon to toggle. To remove the setup and restore normal mapping:
sudo ./scripts/uninstall
The kernel parameter applies to Apple keyboards handled by hid_apple, not to
one individual device. The first release assumes the target is the built-in
MacBook keyboard.
Validate
tests/run
omarchy plugin validate .
qmllint -I "$OMARCHY_PATH/shell" BarWidget.qml
Review the helper, setup script, sudoers rule, and removal behavior before enabling the plugin.