From 118143ad73faca52bbc39cdec22eb7afbc4bdf8b Mon Sep 17 00:00:00 2001 From: girst Date: Fri, 19 Feb 2016 03:12:00 +0100 Subject: [PATCH] readme: expanded example of adding new keyboard layout --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 55c6ae9..87cb966 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ enum kbdl { //keyboard layouts: ``` 3. in `scancodes.c` you need to add a new column (containing more columns) to the big `keysyms[]` table: It is suggested to explicitly name `.is_dead` and `.unicode` to avoid confusion. Also notice that `.is_dead` is part of the layout (and goes within the inner braces), while `.unicode` resides in the keysym-struct. +if you want to add new keys, the following must be kept in mind: `toscan()` will use the nth line of the table, if n is larger than 32 (aka. will use the ascii code to look up chars). symbols not in the 7-bit ascii standard can be put on the first 32 positions as utf-8 encoded strings, although keeping [0] to the release all chars is recommended. (some text editors will convert files to older encodings - this might break things) ``` struct keysym keysyms[] = { //... -- 2.39.3