Skip to content

Instantly share code, notes, and snippets.

@ayosec
Created November 17, 2011 00:18
Show Gist options
  • Save ayosec/1371972 to your computer and use it in GitHub Desktop.
Save ayosec/1371972 to your computer and use it in GitHub Desktop.
Custom keyboard for X

So, what's this?

A little modification over the default spanish keyboard.

With this rules you can type á with «AltGr»+«a», é with «AltGr»+«e», whatever. The symbol is on «AltGr»+«e», and ® is on «AltGr»+«Shift»+«e»

Installation

  • Create a directory ~/.xkb and download the custom and load_custom_xkb.sh
  • Add /home/.../.xkb/load_custom_xkb.sh to your session. In GNOME you can use the gnome-session-propertiescommand.
xkb_keymap {
xkb_keycodes {
include "evdev+aliases(qwerty)"
<HYPL> = 133;
<LWIN> = 255;
};
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_geometry { include "pc(pc105)" };
xkb_symbols {
include "pc+es+inet(evdev)"
key <AC01> { [ a, A, aacute, Aacute ] };
key <AD03> { [ e, E, eacute, Eacute ] };
key <AD08> { [ i, I, iacute, Iacute ] };
key <AD09> { [ o, O, oacute, Oacute ] };
key <AD07> { [ u, U, uacute, Uacute ] };
key <AD04> { [ r, R, EuroSign, registered ] };
key <HYPL> { [ Hyper_L ] };
modifier_map Mod4 { Hyper_L };
};
};
// vim: syntax=xkb
#!/bin/sh
echo Loading $HOME/.xkb/custom...
xkbcomp $HOME/.xkb/custom $DISPLAY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment