summaryrefslogtreecommitdiff
path: root/XKBLayoutCreationNotes.mdwn
blob: 7d5d7972d5f6d77adc4420ac50433a5c41998456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


# Notes for the uninitiated: Creating custom keyboards


## Printing geometry

_xkbprint_ reads **.xkm** files, which are generated by _xkbcomp_.  

_xkbcomp_ reads **.xkb** files, which are located in the keymap directory.  An example of printing a geometry is: 
[[!format txt """
cd /usr/share/X11/xkb/keymap
xkbcomp xfree86 -m dvorak
xkbprint dvorak.xkm
"""]]
This creates the files _dvorak.xkm_ and _dvorak.ps_.  

You may get an error such as: 
[[!format txt """
Error:            No Symbols named "pc105" in the include file "us"
                  Exiting
                  Abandoning symbols file "us"
"""]]
This is because keymaps are an obsolete technique for specifying your keyboard to X. As such they have not been maintained as the other directories have evolved. You will have to either track down how the keymap names have changed in the other directories and update the keymap file (usually easy to do with a quick inspection and grep) or write your own little **.xkb** file (also not too hard to do).   


## showkey codes are different than xkb keycodes

_showkey_ is used to display keyboard scancodes on the console, for use when creating keymaps for _loadkeys_. However the scancodes reported by _showkey_ are **different** than the keycodes xkb reads. To inspect the keycodes as seen by xkb for individual keypresses, use _xev_ from inside Xwindows.