Making a keymap

Gary W. Swearingen garys at opusnet.com
Fri Apr 14 21:33:08 UTC 2006


Jenda Vancura <jendavancura at gmail.com> writes:

> I have a new keyboard, which happens to have two \ | keys, one of
> which doesn't do anything (0x9e) and I would like it to act as the
> 'french key'. That means do a circomflex with shift, and a special
> dead character without shift. This dead character manifests itself as
> a e-grave on an E but as a ç when pressed before a C. Any ideas how i
> could do this?

Ideas?  More like clues.  I have a kbd with "internet" buttons.  I
thought I used "xev" to find their keycodes, but the keys are ignored
when I try it just now.  I don't know what to say about that.

I then modified some of the X files (XFree86 files last time I used
the mapping, probably).

Here's one of my notes:

  MY FIX: in /usr/X11R6/lib/X11/xkb/symbols/pc I replace "us" with a
  copy of "/my/symbols_us.custom"

which was customized to include this:

  xkb_symbols "basic" {

    name[Group1]= "US/ASCII";
    key <ESC>  {	[ Escape			]	};

    key <I6A>  { [ kana_YA ]  };  //= special Back
    key <I69>  { [ kana_MO ]  };  //= special Forward
    key <I68>  { [ kana_ME ]  };  //= special Stop
    key <I67>  { [ kana_MU ]  };  //= special Refresh
    key <I65>  { [ kana_MA ]  };  //= special Search
    key <I66>  { [ kana_MI ]  };  //= special Favorites
    key <I32>  { [ kana_HI ]  };  //= special Web/Home
    key <I6C>  { [ kana_YO ]  };  //= special Mail
    key <I6D>  { [ kana_RA ]  };  //= special Media
    key <I20>  { [ kana_NA ]  };  //= special Mute
    key <I10>  { [ kana_TE ]  };  //= special Previous
    key <I22>  { [ kana_NU ]  };  //= special >/||
    key <I24>  { [ kana_NE ]  };  //= special "black box"
    key <I19>  { [ kana_TO ]  };  //= special Next
    key <I2E>  { [ kana_NO ]  };  //= special "-Volume"
    key <I30>  { [ kana_HA ]  };  //= special "+Volume"
    key <I6B>  { [ kana_YU ]  };  //= special MyComputer
    key <I21>  { [ kana_NI ]  };  //= special Calculator
    key <I5E>  { [ kana_FU ]  };  //= special Power
    key <I5F>  { [ kana_HE ]  };  //= special Sleep
    key <I63>  { [ kana_HO ]  };  //= special Wakup

(Hope I didn't snip too much.)  I just used the unused "kana*" names
because I didn't learn how to create my own.  That "stanza" and file
must somehow be the one associated with the little keyboard config in
the X config file, which the standard US default was, in my case.

Just comparing the above with xev output, I must have looked at some
other file under /usr/X11R6/lib/X11/xkb/ to associate the keycodes
with those I?? names above.

I then used the "kana*" names as key names when customizing keys in my
window manager (fvwm2 at the time).


I hope someone suggests a better Gnome/KDE way.  Good luck.




More information about the ubuntu-users mailing list