aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-03-03Fix Hangeul/Hanja scancodesHEADmasterRoss Lagerwall2-6/+13
Invert the Xfree86 scancodes for these keys. They were swapped due to a Linux bug which has since been fixed [1]. Fix the scancodes for the AT set 1 to be correct - they include bit 0x80 which requires some special handling to avoid triggering asserts. Also ensure that the QNum scancodes remain as 0x71/0x72 to avoid the wire protocol changing. Finally, add the scancodes for AT set 2 since this is what Windows uses. [1] Linux commit 0ae051a19092 ("Input: atkbd - fix HANGEUL/HANJA keys") Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
2023-02-28Add Qemu qcode support for F13 to F24William1-12/+12
2023-02-01Don't hardcode python3 path in shebangDawid Dziurla1-1/+1
2023-01-20Use python3 binary rather than unversioned pythonRoss Lagerwall1-1/+1
Some distros do not provide an unversioned python binary and it could point to either python2 or python3. Use python3 explicitly instead. Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
2023-01-16Revert "Add local argparse for compat with python 2.6"Daniel P. Berrangé4-2418/+1
This reverts commit 56ce5650d2c6ea216b4580df44b9a6dd3bc92c3b. Python 2 is end of life and if by some chance there is still unexpected usage of python 2, it is likely that it is is 2.7 which includes argparse. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-08-23Fix macOS "ISO" keyPierre Ossman1-2/+2
This is actually the common ISO "102nd" key, found between the left shift and "Z". Note that this is still technically wrong, as macOS swaps the key codes for ANSI_Grave and ISO_Section for ISO layouts. This magic is not something we can encode here though, so that swapping will have to be done by the implementations using this data.
2022-06-21make the meson.build stub a bit more well-rounded by exporting filesEli Schwartz1-1/+6
Provide variables for: - the found program keymap-gen - the CSV mapping table and for enhanced convenience, override keymap-gen This allows grabbing the variables from another Meson project without futzing with submodule paths, something that Meson doesn't really encourage.
2022-03-22Add .gitattributes fileAndrea Bolognani1-0/+2
The files marked as export-ignore here are not going to be included in the tarball produced by 'meson dist' when using meson >= 0.60. Older versions of meson excluded some files automatically, but that no longer happens. Note that, while keycodemapdb itself doesn't use meson or really produce release tarballs, the presence of this file will help meson-using projects that include it as a git submodule - for example libvirt. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2021-11-02add more japanese mappingsgsittyz1-12/+14
2021-06-28Add QEMU QKeyCode "lang1" and "lang2"Akihiko Odaki1-2/+2
This corresponds to commit d7696ff884e35c6dacf83a7cbe3355e3b0a90125 of https://gitlab.com/qemu-project/qemu. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
2021-03-08rust: fix cargo clippyMarc-André Lureau3-4/+10
Fix clippy error about missing main(). Fix various clippy warnings "help: consider removing `'static`: `&str`" Run clippy with the rust test. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-02-12tests: add rust testMarc-André Lureau4-1/+59
2021-02-12gen: add --lang rustMarc-André Lureau2-0/+50
The static maps use the phf crate. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-02-12tests: fix argument orderMarc-André Lureau1-48/+48
Fixes: 7381b9bfadd31c ("Introduce separate args for title & subtitle with docs generator") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-11-11Fix scan codes for Korean keysPierre Ossman1-4/+4
No idea where the previous values are from, but they are not supported by any information we can find now.
2020-11-11Fix argument order in output headersPierre Ossman1-12/+12
The sub-command needs to come before all other arguments.
2020-11-11Add HTML entries for Korean layout keysPierre Ossman1-2/+2
2020-11-11Add macOS entries for Japanese keyboardsPierre Ossman1-5/+5
Apple has a different layout for their Japanese keyboards compared to PC and are reusing the scan codes used on Korean layouts for their special keys.
2020-05-01Fix win32 keycode for VK_OEM_102Volker Rümelin1-1/+1
The win32 keycode for VK_OEM_102 is 0xe2. The Microsoft docu- mentation for virtual-key codes agrees with mingw32/winuser.h. Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
2019-12-06Add support for generating RST formatted docs pagesDaniel P. Berrangé1-0/+58
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-06Introduce separate args for title & subtitle with docs generatorDaniel P. Berrangé1-25/+52
With this change the calling conversion is different, the --varname arg must be after the command name. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-15keymap-gen: Name sections in pod outputAndrea Bolognani1-2/+10
Properly formatted man pages have at least a NAME section, which tools like apropos(1) parse and index. The current implementation of PodLanguageGenerator doesn't generate this section, and even if the user were to try and work around the limitation by passing --varname=NAME, there would still be nothing in the section to actually parse. Change the generator so that varname will be used as the contents of the NAME section, add a DESCRIPTION section in which values are listed. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2019-02-15Add an empty meson projectMarc-André Lureau1-0/+1
This allows to make keycodemapdb a subproject() in meson. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-02-21remove buildtime from generated filesOlaf Hering1-2/+1
Each rebuild gets a different file even if the sources are unchanged. Debian sells this as "reproducible build". SUSE just wants to avoid needless republish of otherwise identical binaries. Signed-off-by: Olaf Hering <olaf@aepfle.de>
2018-02-02add header file generatorsPaolo Bonzini2-26/+139
keymap-gen can create header files that include the length of the array. Using ARRAY_SIZE on the array becomes then possible, and this can be preferrable to the "x_len" symbols because static analysis cannot necessarily see the value of "x_len". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-02-02c++: add extern declaration to the generated filePaolo Bonzini1-0/+2
The extern declaration affects how the C++ compiler does name mangling of global variables. With: $ g++ -c -Wall -std=c++11 -o osx2win32.o osx2win32.cc $ nm osx2win32.o | grep code_map_osx_to_win32 0000000000000000 B code_map_osx_to_win32 00000000000000a1 t _GLOBAL__sub_I_code_map_osx_to_win32 Without: $ g++ -c -Wall -std=c++11 -o osx2win32.o osx2win32.cc $ nm osx2win32.o | grep code_map_osx_to_win32 0000000000000000 b _ZL21code_map_osx_to_win32 Not that unlike C, without "extern" you get a local variable ("b"), while "extern" is needed to get a global! Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-02-02move CLanguageGenerator closer to CLanguageGenerator itselfPaolo Bonzini1-10/+10
This is a small aesthetic change before introducing the generator subclasses for C and C++ header files; place each subclass close to the superclass. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-01-12Fix compat with py3 dict keys/values data typesDaniel P. Berrange1-9/+9
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-12-18Add missing QKeyCode values for JIS keyboardsMiika S1-4/+4
The AT set1 code for KEY_ISO is removed because it conflicts with KEY_KATAKANAHIRAGANA. Signed-off-by: Miika S <miika9764@gmail.com>
2017-10-19Fix mistake in Pause/SysRq mapping for SUN scancodeDaniel P. Berrange1-2/+2
The 0x15 scancode is actually referring to Pause, but was mistakenly recorded as a second scancode for SysRq Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-10-19Add hack for mapping qnum 0xb7 to sysrqDaniel P. Berrange1-0/+6
Historical versions of QEMU allowed both 0x54 and 0xb7 to trigger a print/sysrq key. Although 0x54 is preferred, we must cope with 0xb7 for backwards compat. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-14Add local argparse for compat with python 2.6Daniel P. Berrange4-1/+2418
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-10Rename 'rfb' to 'qnum'Daniel P. Berrange1-8/+8
The 'rfb' keymap is not actually defined by the RFB protocol. It is the QEMU key number mapping, that happens to be used by a QEMU RFB extension. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-10Allow customizing the map length data typeDaniel P. Berrange1-6/+7
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-08Fix USB menu key mappingDaniel P. Berrange1-2/+2
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-08Remove ??? from some keynamesDaniel P. Berrange1-4/+4
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-08Fix ANSI_KeypadClear mapping for OSXDaniel P. Berrange1-3/+3
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-08Handle maps where 0x0 is a valid keyDaniel P. Berrange2-13/+30
With OS-X / ADB keycodes 0x0 refers to key 'A', so cannot be used as the default in the array. We must use 0xff instead and thus explicitly fill every array entry with 0xff if no mapping is available. To handle this for enum based source maps, we need to use the magic syntax [0 .... max] = value, to set the default value in all elements, and then override it afterwards for mappings which are known. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-08Add support for array upper bounds with enumsDaniel P. Berrange1-3/+7
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-08Add missing Help key entry for OS-X key codesDaniel P. Berrange1-1/+1
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07Add many missing Sun scancodesDaniel P. Berrange1-15/+15
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07Add Apple Desktop Bus scancodesDaniel P. Berrange2-539/+545
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07Misc fixes in AT set 3 scancodesDaniel P. Berrange1-5/+5
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07Fix AT set3 mapping for backslashDaniel P. Berrange1-8/+8
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07Fix AT Set2 scancode for F7Daniel P. Berrange1-1/+1
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07Add line for QKeyCode printDaniel P. Berrange1-1/+1
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07Add line for QKeyCode asteriskDaniel P. Berrange1-0/+1
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07Add some missing mappings for USB HIDDaniel P. Berrange1-0/+9
Some USB scan codes map to the same Linux key code, and we were missing the first mapping. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07Add Sun/Sparc keyboard keycodesDaniel P. Berrange2-529/+535
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-07Build tests with warnings enabledDaniel P. Berrange1-2/+2
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>