support for custom xkb layouts

Michal Suchanek hramrach at gmail.com
Mon Sep 9 06:13:42 PDT 2013


Hello,

I am using Debian which has a preinstalled package with  xkb layouts.

How I am supposed to install my own layout without rolling my own package?

Looking through the xkb files there is totally non-extensible rules
file (or if it's extensible the way to extend it is undocumented).
Sure, this file contains a note tat it is merged from multiple parts
during build but once built there is no way to add new rulse.

To use custom layout bits you have to include them in this file afaict.

As an example I tried to add an option to swap left ctrl and left win
key. Together with ctrl:nocaps this would land the ctrl and win keys
in the same place on different keyboards I use some of which have
rather odd physical layout. It does not work, however.

The ctrl:nocaps option sets the ctrl key to be ctrl modifier in a way
I did not figure out how to override. It does this for no good reason
- the ctrl:nocaps option works when setting only the capslock key to
be control modifier. Control is already set as control modifier on the
pc layout in a way that for some reason can be overriden.

Other problem is that when I add to the altwin symbols file to
implement my option I also need to add it to the rules file. I have no
idea how it would be used otherwise - the way the existing options are
used relies on them being registered in rules file, apparently.

Another problem is that I am missing some keys like printscreen or
delete on one keyboard and the middle mouse button on a touchpad.
Since the touchpad buttons cannot be physically depressed both at the
same time these are all candidates for putting into some sort of xkb
layer. I tried to figure out how mousekeys and microsoft numpad layer
work but I settled for simpler solution with using the mac mouse
button emulation and special keyboard layout. Still integrating the
layout again requires updating the rules file.

Looking for xkb documentation I only found documents on how to use the
existing files, not how to write new ones.

If there is documentation of the xkb files and a way to install custm
layouts I would like to hear about it.

Thanks

Michal


More information about the xorg-devel mailing list