xmodmap to XKB conversion and xkbprint rendering

Michael Cardell Widerkrantz mc at hack.org
Sat Jul 16 20:21:52 UTC 2011


I'm trying to convert an old xmodmap keyboard layout to an XKB layout.
Most of it seems to work OK. A description of what I did to add the
layout without touching system files is here:

  http://hack.org/mc/writings/xkb.html

There is one remaining problem. My xmodmap layout generated Control-]
(lookup gave 0x1d) when I pressed Control-å. I liked this behaviour. I
haven't figured out how to do that with XKB. Perhaps someone here knows?

Interestingly, if I load my xmodmap layout and immediately after dump
the current XKB layout, then reset by setting an unrelated keymap and
then reload what I dumped the reload generates an error. I do:

% xmodmap lib/xmodmap/hhkb-se.xmodmap
% xkbcomp $DISPLAY -o hhkb.xkb
% setxkbmap us
% xkbcomp hhkb.xkb $DISPLAY 

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  145 (XKEYBOARD)
  Minor opcode of failed request:  9 (XkbSetMap)
  Value in failed request:  0x16520002
  Serial number of failed request:  94
  Current serial number in output stream:  100

Anyone?

I'm using:

  xorg-server-1.7.7_1,1
  setxkbmap-1.1.0
  xkbcomp-1.1.0

Another little snag is that in the keyboard image xkbprint generates the
glyphs for the special characters I've added aren't rendered. For
instance, it prints "Aring" "Adiaresis" instead of a proper "Å" and "Ä".
I've seen other keyboard images that seem to be generated by xkbprint
that includes more than ASCII. How do they do that?

-- 
http://hack.org/mc/
Use plain text e-mail, please. OpenPGP welcome, 0xE4C92FA5.



More information about the freebsd-x11 mailing list