International US keyboard - AltGr deadkeys

Adriaan van Nijendaal adriaan at choam.com
Fri Jul 27 05:21:22 PDT 2007


Two questions:

1. How to 'integrate' a new keyboard layout?

I have added a layout I like to /usr/share/X11/xkb/symbols/us (see
below) but it's not picked up by gnome-keyboard-properties. Why?

2. How to submit a new layout variant for distribution?

Background:

I regularly write four languages (Dutch, English, French and German)
on a US keyboard (Model M - © IBM 1984).

I dislike the International keyboard layout. Why do I have to press
two keys for a single quote (' followed the spacebar) just because the
' key is a dead-key that enables me to type an eacute (é)?

I decided to 'hide' the dead-keys behind AltGr (the right Alt key).
AltGr+' followed by e gives me eacute (é). It also gives me
m² (AltGr+2).

I dug into the xkb structure (and the scarce information) but I have
been unsuccessful in 'mastering' it.

Yet, I have been using 'my' keyboard for three years, by adding the
following section to the /usr/share/X11/xkb/symbols/us file:

// The keyboard section in the X-server config file
// (/etc/X11/xorg.conf on my system) looks like this:
//
// Section "InputDevice"
//   Driver	"kbd"
//   Identifier	"Keyboard[0]"
//   Option	"XkbModel"	"pc101"
//   Option	"XkbLayout"	"us"
//   Option	"XkbVariant"	"altgr-intl"
// EndSection
//
// To be effective, you need to install this file, change the X config
// file and restart the X-server. Or, alternatively, you can do this
// run-time:
//
// setxkbmap -v -rules xorg -model pc101 -layout us -variant altgr-intl
//
// Once the X-server has loaded the new config, a keyboard can be
// displayed with: (if you change "-ll 1" into "-ll 2", you'll see
// the special keys ONLY.)
//
//   xkbcomp -o /tmp/keyboard.xkm -opt cgkst -xkb $DISPLAY
//   xkbprint -o /tmp/keyboard.xkm.ps -kc -nkg 2 -ntg 4 -lg 1 -ll 1 \
//	-lc en_US.iso885915 -level2 -mono -label symbols -w 3 $DISPLAY;
//   gv -seascape /tmp/keyboard.xkm.ps
//   rm -f /tmp/keyboard.xkm.ps /tmp/keyboard.xkm
//

partial alphanumeric_keys
xkb_symbols "altgr-intl" {

    name[Group1]= "U.S. English - International (AltGr dead keys)";

    include "us(basic)"

    key <TLDE> { [    grave,	asciitilde,	dead_grave,	dead_tilde	] };
    key <AE01> { [	  1,	exclam,		onesuperior,	exclamdown	] };
    key <AE02> { [	  2,	at,		twosuperior,	dead_doubleacute] };
    key <AE03> { [	  3,	numbersign,	threesuperior,	dead_macron	] };
    key <AE04> { [	  4,	dollar,		currency,	sterling	] };
    key <AE05> { [	  5,	percent,		EuroSign		] };
    key <AE06> { [	  6,	asciicircum,		dead_circumflex		] };
    key <AE07> { [	  7,	ampersand,		dead_horn		] };
    key <AE08> { [	  8,	asterisk,		dead_ogonek		] };
    key <AE09> { [	  9,	parenleft,  leftsinglequotemark,dead_breve	] };
    key <AE10> { [	  0,	parenright,rightsinglequotemark,dead_abovering	] };
    key <AE11> { [    minus,	underscore,	yen,		dead_belowdot	] };
    key <AE12> { [    equal,	plus,		multiply,	division	] };

    key <AD01> { [	  q,	Q,		adiaeresis,	Adiaeresis	] };
    key <AD02> { [	  w,	W,		aring,		Aring		] };
    key <AD03> { [	  e,	E,		eacute,		Eacute		] };
    key <AD04> { [	  r,	R,		ediaeresis,	Ediaeresis	] };
    key <AD05> { [	  t,	T,		thorn,		THORN		] };
    key <AD06> { [	  y,	Y,		udiaeresis,	Udiaeresis	] };
    key <AD07> { [	  u,	U,		uacute,		Uacute		] };
    key <AD08> { [	  i,	I,		iacute,		Iacute		] };
    key <AD09> { [	  o,	O,		oacute,		Oacute		] };
    key <AD10> { [	  p,	P,		odiaeresis,	Odiaeresis	] };
    key <AD11> { [ bracketleft,	braceleft,		guillemotleft		] };
    key <AD12> { [ bracketright,braceright,		guillemotright		] };

    key <AC01> { [	  a,	A,		aacute,		Aacute		] };
    key <AC02> { [	  s,	S,		ssharp,		section		] };
    key <AC03> { [	  d,	D,		eth,		ETH		] };
    key <AC04> { [	  f,	F						] };
    key <AC05> { [	  g,	G						] };
    key <AC06> { [	  h,	H						] };
    key <AC07> { [	  j,	J,		idiaeresis,	Idiaeresis	] };
    key <AC08> { [	  k,	K						] };
    key <AC09> { [	  l,	L,		oslash,		Ooblique	] };
    key <AC10> { [semicolon,	colon,		paragraph,	degree		] };
    key <AC11> { [apostrophe,	quotedbl,	dead_acute,	dead_diaeresis	] };

    key <AB01> { [	  z,	Z,		ae,		AE		] };
    key <AB02> { [	  x,	X,		oe,		OE		] };
    key <AB03> { [	  c,	C,		copyright,	cent		] };
    key <AB04> { [	  v,	V,		registered,	registered	] };
    key <AB05> { [	  b,	B						] };
    key <AB06> { [	  n,	N,		ntilde,		Ntilde		] };
    key <AB07> { [	  m,	M,		mu,		mu		] };
    key <AB08> { [    comma,	less,		ccedilla,	Ccedilla	] };
    key <AB09> { [   period,	greater,	dead_abovedot,	dead_caron	] };
    key <AB10> { [    slash,	question,	questiondown,	dead_hook	] };
    key <BKSL> { [backslash,	bar,		notsign,	brokenbar	] };

    include "level3(ralt_switch)"
};

Now, my problem: gnome-keyboard-properties cannot 'find' this layout.
I think it has something to do with /usr/share/X11/xkb/symbols.dir.
But adding a line there doesn't work either. Replacing one of the
existing entries with mine does work - gnome-keyboard-properties even
picks up any changed comments.

The xbk compiler doesn't like it either, but then again, it dislikes
many other layouts as well.

What am I missing?

Some more people (other than my geeky friends) might actually like
this. Who should I talk to in order to have this added to the 'us'
file?

Regards,

Adriaan

--
Windows 98: n.; 32 bit extensions and a graphical shell for a 16 bit patch
to an 8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company that can't stand 1 bit of competition!


More information about the xorg mailing list