Skip to content

Instantly share code, notes, and snippets.

@chutsu
Last active May 18, 2022 09:22
Show Gist options
  • Save chutsu/a2af728849886e5eb387628dce5f22b2 to your computer and use it in GitHub Desktop.
Save chutsu/a2af728849886e5eb387628dce5f22b2 to your computer and use it in GitHub Desktop.

Configure Apple Magic Keyboard in Ubuntu

In-order to:

  • Enable function keys by default
  • Swap option (alt) with command key
  • Swap fn with left-ctrl key

on the Apple Magic Keyboard:

  1. Create /etc/modprobe.d/hid_apple.conf:
options hid_apple fnmode=2
options hid_apple swap_opt_cmd=1
options hid_apple swap_fn_leftctrl=1

For more options have a look at Arch Linux's Wiki here.

  1. Trigger copying the configuration into the initramfs bootfile.
sudo update-initramfs -u -k all
  1. Reboot
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment