Apple Keyboard

From Void Linux Wiki
Jump to: navigation, search

This is a guide on how to make Apple Keyboards behave exactly like normal keyboards.

Note: This is not a pretty solution. It just changes the layout, i.e. normal Function keys, alt and cmd keys switched back, etc.

Prerequisites

You need to download/clone:

You must have udev set up.


Doing

First, untar the keyfuzz tarball whereever you like, cd into the directory, build and install it:

# tar xvzf keyfuzz-0.2.tar.gz
# cd keyfuzz-0.2
# ./configure --with-init-dir=. --disable-lynx
# make
# make install

Next, cd to the un-apple-keyboard repo. If you have an English International layout keyboard (the English International has the L-shaped Enter key), you may want to change

options hid_apple fnmode=2 iso_layout=0 swap_opt_cmd=1

to

options hid_apple fnmode=2 swap_opt_cmd=1

in the file hid_apple.conf.

Next, we install un-apple-keyboard manually (it's originally and AUR package):

# mkdir /etc/udev/rules.d
# cp 10-apple-keyboard-rules /etc/udev/rules.d/
# cp fix-apple-keyboard /usr/bin/
# mkdir /etc/keyfuzz
# cp apple_keyboard.keyfuzz /etc/keyfuzz/
# cp hid_apple.conf /etc/modprobe.d/
# mkdir -p /usr/share/licenses/un-apple-keyboard && sudo cp LICENSE /usr/share/licenses/un-apple-keyboard  -- Non functional step, default on Arch

Now for the last coup (if you're doing this from your Apple keyboard, do both in one step as shown here):

# sudo rmmod hid_apple && sudo modprobe hid_apple

You may need to replug your keyboard.

Also, if you want this to work on boot, you'll want to reconfigure your initramfs:

# dracut --force --hostonly '' 4.0.4_1 -- or whatever your kernel version is