Skip to content

Instantly share code, notes, and snippets.

@xanathar
Forked from tsak/hid_apple.conf
Created April 28, 2025 16:12
Show Gist options
  • Save xanathar/efa792f4b4defec6975b06785b23ae4b to your computer and use it in GitHub Desktop.
Save xanathar/efa792f4b4defec6975b06785b23ae4b to your computer and use it in GitHub Desktop.
/etc/modprobe.d/hid_apple.conf
options hid_apple fnmode=2
options hid_apple swap_opt_cmd=1
@xanathar
Copy link
Author

xanathar commented Apr 28, 2025

Reference: https://wiki.archlinux.org/title/Apple_Keyboard (it's Arch, but works in whatever Linux)

After this, to apply:

For Ubuntu: sudo update-initramfs -u -k all

For Fedora:

  • sudo vi /etc/dracut.conf.d/hid_apple.conf add install_items+=/etc/modprobe.d/hid_apple.conf
  • Then: dracut --force

In both cases, then reboot.


To change the settings to the current session:

  • sudo vi /sys/module/hid_apple/parameters/fnmode overwrite with 2
  • sudo vi /sys/module/hid_apple/parameters/swap_opt_cmd, overwrite with 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment