A slightly technical blog by Stephen D. Strowes.
Random header image... Refresh for more!

Aluminium Apple keyboard with Linux

Or, specifically, X; I haven’t tried to make this work outwith X yet. But I did create a ~/.Xmodmap file to map the key bindings of my Apple keyboard to a more normal PC layout so I can continue to touchtype with ease. Note that I move around some of the punctuation, so if you look at the keyboard to type these xmodmap calls will confuse you!

This is based on the excellent information held within the Ubuntu documentation.

My ~/.Xmodmap now contains the following:

keycode 11 = 2 quotedbl
keycode 12 = 3 sterling EuroSign
keycode 48 = apostrophe at
keycode 49 = backslash bar
keycode 51 = numbersign asciitilde

! bind Caps Lock key as an additional Control
keycode 66 = Control_L
! Bind Apple’s “Clear” key to be NumLock
keycode 77 = Num_Lock

! This is the key directly beneath escape
keycode 94 = grave notsign brokenbar

! Map the fn key to Insert
keycode 118 = Insert

! Alt and AltGr
keycode 133 = Meta_L
keycode 134 = Mode_switch

! F13: Insert key; F14: PrintScr; F15: ScrollLock; F16: Pause/Break.
keycode 191 = Insert
keycode 192 = Print Sys_Req
keycode 193 = Scroll_Lock
keycode 194 = Pause Break
keycode 195 = XF86AudioMute
keycode 196 = XF86AudioPrev
keycode 197 = XF86AudioNext

! Finalise modifiers and control statuses
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
add Shift = Shift_L Shift_R
add Lock = Caps_Lock
add Control = Control_L Control_R
add Mod1 = Alt_L 0x007D
add Mod2 = Num_Lock
add Mod4 = Super_L Super_R
add Mod5 = Mode_switch ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift