Thursday, April 17, 2008

Dvorak Spanish keyboard layout (xkb)

Here's a basically US-English Dvorak layout, with right Alt meta mapped to give you Spanish characters right where you'd expect them: meta-vowel is accented vowel, meta-n is ñ, meta-1 is ¡, and meta-/ is ¿.

Add the following to your /usr/share/X11/xdb/symbols/us file:

partial alphanumeric_keys
xkb_symbols "dvorak-spanish" {

name[Group1]= "USA - Dvorak with Spanish extras";

include "us(dvorak)"

key <ae04> { [ 4, dollar, EuroSign ] };

key <ad04> { [ p, P, udiaeresis, Udiaeresis ] };

key <ac01> { [ a, A, aacute, Aacute ] };
key <ac02> { [ o, O, oacute, Oacute ] };
key <ac03> { [ e, E, eacute, Eacute ] };
key <ac04> { [ u, U, uacute, Uacute ] };
key <ac05> { [ i, I, iacute, Iacute ] };
key <ac09> { [ n, N, ntilde, Ntilde ] };

key <ae01> { [ 1, exclam, exclamdown ] };
key <ad11> { [ slash, question, questiondown ] };

include "level3(ralt_switch)"
};
Then say 'setxkbmap us dvorak-spanish'.

No comments: