Keyboard MB110 on Linux

So I got myself a new keyboard. It's an Apple MB110 (D/B variant). Works flawlessly in xorg after configuring it.

Raw
# Only if you're german
setxkbmap de

# Absolutely necessary
setxkbmap -option apple:badmap

# Yes, swap escape and caps lock
setxkbmap -option caps:swapescape

# Swapping the command and option keys was a little tricky:
# http://unix.stackexchange.com/questions/4485/reassign-ctl-and-alt-keys-xmodmap-error
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564327
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565279

# Put this into ~/.xsession-command and use it with xmodmap ~/.xsession-command
clear Mod1
clear Mod4

keycode 64 = Super_L
keycode 133 = Alt_L
keycode 134 = ISO_Level3_Shift
keycode 108 = Super_R

add Mod1 = Alt_L Alt_R

# To fix the function keys (you need to use fn by default to access them)
# https://help.ubuntu.com/community/AppleKeyboard#Change_Function_Key_behavior
# echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode (temporary)
# echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf (permanent, reboot)

0 comments

Reply

Cancel reply
Markdown. Syntax highlighting with <code lang="php"><?php echo "Hello, world!"; ?></code> etc.
DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceUse a maskWorldInternet securityPianoFontGnuPGThunderbirdJenkinshome-assistant-logo