• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

data/H28-Jun-2021-

tests/H28-Jun-2021-

thirdparty/H03-May-2022-

tools/H28-Jun-2021-

LICENSE.BSDH A D28-Jun-20211.5 KiB

LICENSE.GPL2H A D28-Jun-202117.6 KiB

READMEH A D28-Jun-20212.6 KiB

meson.buildH A D28-Jun-202124

README

1   Key code / scan code / key symbol mapping database
2   ==================================================
3
4This module provides a database that maps between different
5key code / scan code / key symbol sets:
6
7 - Linux evdev
8 - OS-X
9 - AT Set 1
10 - AT Set 2
11 - AT Set 3
12 - XT
13 - Linux XT KBD driver
14 - USB HID
15 - Win32
16 - XWin XT
17 - XKBD XT
18 - Xorg Evdev
19 - Xorg KBD
20 - Xorg OS-X
21 - XOrg Cygwin
22 - RFB
23
24Licensing
25---------
26
27The contents of this package are dual licensed under the terms of:
28
29 - GNU General Public License (version 2 or later)
30 - 3-clause BSD License
31
32The output files generated by keymap-gen may be distributed & used under
33the terms of either of the above licenses.
34
35Data formats
36------------
37
38The following output formats are possible
39
40 - Code map
41
42   An array mapping between key code sets values
43
44   Indexes in the array are values from the source code set.
45   Entries in the array are values from the target code set
46
47
48 - Code table
49
50   An array listing all values in a key code set
51
52   Indexes in the array are simply a numeric counter
53   Entries in the array are values from the key code set
54
55   The size of the array matches the total number of entries in
56   the keycode database.
57
58
59 - Name map
60
61   An array mapping between key code sets values and names
62
63   Indexes in the array are values from the source code set
64   Entries in the array are names from the target code set
65
66
67 - Name table
68
69   An array listing all names in a key code set
70
71   Indexes in the array are simply a numeric counter
72   Entries in the array are values from the key code set
73
74   The size of the array matches the total number of entries in
75   the keycode database.
76
77
78Output languages
79----------------
80
81The tool is capable of generating data tables for the following
82programming languages / environments
83
84 - Standard C
85 - GLib2 (standard C, but with GLib2 data types)
86 - Python
87 - Perl
88 - Rust
89
90
91Usage
92-----
93
94Map values from AT Set 1 to USB HID, generating tables for the
95C programming language
96
97 $ keymap-gen --lang stdc code-map data/keymaps.csv atset1 usb
98
99Generate a tables of names for Linux key codes, OS-X key codes,
100in python - equivalent array indexes map between the two sets.
101A variable name override is used
102
103 $ keymap-gen --varname linux_keycodes --lang stdc \
104              code-table data/keymaps.csv linux
105 $ keymap-gen --varname osx_keycodes --lang stdc \
106              code-table data/keymaps.csv os-x
107
108Generate a mapping from XOrg XWin values to Win32 names
109
110 $ keymap-gen --lang perl name-map data/keymaps.csv xorgxwin win32
111
112Generate a table of names for Linux key codes in Perl
113
114 $ keymap-gen --lang perl name-table data/keymaps.csv linux
115
116