local xkb layouts

Dirk Wallenstein halsmit at t-online.de
Thu Jan 6 07:33:19 PST 2011


On Wed, Jan 05, 2011 at 06:25:46PM +0100, Stefan Witzel wrote:
> Am 05.01.2011 16:32, schrieb Dirk Wallenstein:
> > On Wed, Jan 05, 2011 at 02:41:16PM +0100, Stefan Witzel wrote:
> >> is it possible to extend the system-wide xkb layout database by
> >> user-specific files. And if not: why is that?
> >> I ran into this problem because I want a german
> >> "deadgraveacutecircum"-layout in which grave acute and circumflex are
> >> dead but tilde is not. But on systems where I am not administrator I
> >> cannot install this. And even on systems where I am administrator I
> >> would have to renew my changes after every upgrade.
> >> Would the "right" way to do it be to use the standard layout (with dead
> >> tilde) and then use a .Xmodmap? Every time I tried that I got strange
> >> effects when switching between multiple xkb layouts.
> >> Thanks in advance for any help!
> >
> > If you know how to edit XKB keymaps and only need one specific
> > keymap for yourself, I would suggest to simply load the wanted keymap
> > with xkbcomp at startup.  I do that in the KDE autostart folder.
> 
> This sounds like a good idea but apparently I got something wrong. I 
> created a file my_keymap which looks as follows:
> 
> xkb_keymap "de" {
>      xkb_keycodes        { include "xfree86"             };
>      xkb_types           { include "default"             };
>      xkb_compatibility   { include "default"             };
>      xkb_symbols
>      {
>          include "pc(pc105)+de(basic)"
>          name[Group1]="Germany - Dead grave acute circumfex";
> 
>          key <AD12>  { [      plus,   asterisk,   asciitilde, 
> dead_macron ] };
>          key <BKSL>  { [numbersign, apostrophe,        grave, 
> grave ] };
>      };
>      xkb_geometry        { include "pc(pc102)"           };
> };
> 
> When I now do "xkbcomp my_keymap :0.0" the X server crashes. I also 
> tried to put the symbols in a separate symbols file (so as to add them 
> to the existing symbols rather than replacing those), but I could not 
> get him to find that file. I admit that I do not really understand the 
> entire mechanism but I didn't find much documentation of it either.

Oh, sorry for my brevity.  The easiest way to tweak a keymap is to get
the full keymap, tweak it, and load it again.

  $> xkbcomp $DISPLAY my-keymap.xkb
  ... edit my-keymap.xkb
  $> xkbcomp my-keymap.xkb $DISPLAY 

Docs are here:
http://www.x.org/wiki/XKB

There is a tabular display of key-types here:
http://sourceforge.net/tracker/download.php?group_id=286545&atid=1214224&file_id=361450&aid=2945171

-- 
Greetings,
Dirk



More information about the xorg mailing list