I was given an apple keyboard model A1243. The keyboard has a great feel for a low profile keyboard, but the default layout in Linux is a strange. This post gives the configurations to swap the Alt and Cmd keys and how to turn off the multimedia key so that function keys can be used without fn.
I use shortcuts with the left Alt in my ErgoEmacs keyboard layout to move the cursor. I press the alt key with my thumb and then move the cursor with IKJL (similar to gamer’s WSAD). However, the Apple keyboard has Alt and Command switched compared to a typical PC keyboard. The solution is to change a parameter for the kernel module:
echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd
My second issue with this keyboard is that in order to access the functional keys F1–F12 one has to press the fn key. I use a drop-down terminal with a shortcut F12 and pressing fn is just annoying. Especially if I switch between multiple keyboards. To disable the multimedia layout and enable functional key without fn use this:
echo 0 > /sys/module/hid_apple/parameters/fnmode
All commands has to be executed as root.
To make these changes permanent, the configuration can be added to
/etc/modprobe.d/ but I haven’t tested this yet