[haiku-development] Re: Adding new keymap and keyboard layout

  • From: Vincent Duvert <vincent.duvert@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 1 Dec 2009 23:05:02 +0100

Le 1 déc. 2009 à 22:26, Romain a écrit :

> Hello,
> I would like to add a new keymap and a new keyboard layout but I did not
> find all information needed. I am able to edit the keymap via drag'n drop
> on the keymap preference app, save it, and convert it to ascii with "keymap
> -d" for deeper edition.
> I see that keycodes like "0xC382" are used for non ascii keys. Is there a
> list of all possible values somewhere ?

This is an UTF-8 character code. The CharacterMap application should help you 
to find the codes for the characters you want to add.

> Also is there any documentation on the layout format ? I think I
> understand the general idea, but several parts are quite cryptic to me: 
> - ":-; :+4" ? 

represents a spacer. Like a normal key, you can set its size with:
for instance.


will add 4 keys which will follow the previous keycode (spacers doesn't count).
So something like this:
:0x24; :-; :+4;
is equivalent to:
:0x24; :-; :0x26; :0x27; :0x28; :0x29;

> - "d$d" : what is "d" compared to "$" (this last one is a variable if I am
> correct).

Yes, $ indicates the start of a variable: if "$d = 10,20" is indicated at the 
top of the file, then
is equivalent to:

d$d... (or d10,20...) is equivalent to $d, except that the key will be a bit 
darker on the layout viewer.


Other related posts: