Skip to content

Instantly share code, notes, and snippets.

@mark-gerarts
Last active June 16, 2021 05:53
Show Gist options
  • Save mark-gerarts/50f12e8eae76f2c57f5174d80686ef45 to your computer and use it in GitHub Desktop.
Save mark-gerarts/50f12e8eae76f2c57f5174d80686ef45 to your computer and use it in GitHub Desktop.
Fix apple keyboard layout on linux
# More info: https://www.math.cmu.edu/~gautam/sj/blog/20171207-keyboard-settings.html
# and https://wiki.archlinux.org/title/Apple_Keyboard#hid_apple_module_options.
#
# These commands can be made permanent with modprobe, but I use them
# in a menu entry because the Apple keyboard isn't always plugged in.
# Swap the alt and command key
echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd
# Fix the tilde key
echo 0 > /sys/module/hid_apple/parameters/iso_layout
# Use function keys w/o fn
echo 2 > /sys/module/hid_apple/parameters/fnmode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment