Apple Keyboard on Ubuntu: Italian style

2hoidsm

Default settings of Apple slim aluminium keyboard doesn’t fit my italian needs, so here is a brief note, just in case I have to reinstall Ubuntu.

In particular:

  1. “Pipe” and “backslah” keys are swapped to the < and > ones.
  2. Fucntion keys (F1, F2…) have less priority than “special keys” (brightness, volume) you must press Fn in conjuction to the function keys to have the standard behaviour
  3. “Insert” key is missing (the fn key took its place): it is useful for rapid cut and paste (Ctrl-Insert is copy, Shift-Insert is paste)

To fix 1 and 2, add these lines on /etc/rc.local before the exit 0

# swap < and / keys
echo 0 | sudo tee /sys/module/hid_apple/parameters/iso_layout

# function keys priority
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode

Reboot to take effect, it has system-wide effect.

To map the Insert key to the F13 key, add this line to ~/.Xmodmap (or create if you don’t have it)

keycode 191 = Insert

This setting is per-user based.

If you want to map Insert to another key, just grab the correct key code using this command:

xev | sed -n ‘s/^.*keycode *\([0-9]\+\).*$/keycode \1 = /p’

That’s all.

Annunci

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...