Sunday, September 6, 2009

Note to Future-self: Apple keyboard in Linux (Alt. Alt Gr, Win/Command)

This is a note for myself, because I know one day I'm gonna be looking for this information again.
This blog seemed as god as any place to keep it.

At the present time I have an Apple keyboard. Not one of the new macbook-like keyboards, but on of the old clunky ones. Even if Apple call it a potuguese layout, it's still different from "regular" pt_PT keyboards.

So these are the xmodmap instructions to:

1 - Swap the Left Alt key with the Left Command key
remove Mod1 = Alt_L
remove Mod4 = Super_L
keycode 133 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L
keycode 64 = Super_L
add Mod1 = Alt_L
add Mod4 = Super_L


2 - Swap the (Right) Alt Gr with the Right Command Key
remove Mod5 = ISO_Level3_Shift
keycode 134 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 108 = Super_R NoSymbol Super_R NoSymbol Super_R
add Mod5 = ISO_Level3_Shift

0 comments:

Post a Comment