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

..03-May-2022-

data/H12-Jan-2018-

tests/H12-Jan-2018-

thirdparty/H03-May-2022-

tools/H12-Jan-2018-

LICENSE.BSDH A D12-Jan-20181.5 KiB

LICENSE.GPL2H A D12-Jan-201817.6 KiB

READMEH A D12-Jan-20182.6 KiB

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
89
90Usage
91-----
92
93Map values from AT Set 1 to USB HID, generating tables for the
94C programming language
95
96 $ keymap-gen --lang stdc code-map data/keymaps.csv atset1 usb
97
98Generate a tables of names for Linux key codes, OS-X key codes,
99in python - equivalent array indexes map between the two sets.
100A variable name override is used
101
102 $ keymap-gen --varname linux_keycodes --lang stdc \
103              code-table data/keymaps.csv linux
104 $ keymap-gen --varname osx_keycodes --lang stdc \
105              code-table data/keymaps.csv os-x
106
107Generate a mapping from XOrg XWin values to Win32 names
108
109 $ keymap-gen --lang perl name-map data/keymaps.csv xorgxwin win32
110
111Generate a table of names for Linux key codes in Perl
112
113 $ keymap-gen --lang perl name-table data/keymaps.csv linux
114
115