Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
The static maps use the phf crate.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
The sub-command needs to come before all other arguments.
|
|
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
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>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
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>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
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>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
While we know the integer values corresponding to most key sets, the
QEMU QKeyCode values are explicitly not-public, not guaranteed stable.
We must therefore be able to emit symbolic enum constants, instead of
raw int values.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
This give us much nicer lookup for string keys, boundary checks
and better introspection when it comes to iteration.
Signed-off-by: Pierre Ossman <ossman@cendio.se>
|
|
The array might not be in the same unit as the code using it, so
we need a way of indicating the number of entries.
Signed-off-by: Pierre Ossman <ossman@cendio.se>
|
|
Signed-off-by: Pierre Ossman <ossman@cendio.se>
|
|
Some systems use string identifiers rather than integers.
Signed-off-by: Pierre Ossman <ossman@cendio.se>
|
|
Signed-off-by: Pierre Ossman <ossman@cendio.se>
|
|
Signed-off-by: Pierre Ossman <ossman@cendio.se>
|
|
XT, Linux RAW and and AT set 1 are all really the same thing so merge
them all together. Linux RAW uses a different encoding, but we can
compute that as needed.
|
|
The maps are indexed by Linux keycode, not by the keycode type
corresponding to the names.
|
|
Designated initializers ([index] = value,) are not available in C++:
https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
So add a custom stdc++ output format which outputs all array entries instead
of the "sparse" C variant.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
With older argparse (circa 2.7.4 vintage), using set_defaults
to set a function on the main parser prevents it from ever
calling the functions set on the sub-parser.
We registered this default function so that we could get help
usage with argparse on python 3.x, since it doesn't print
error by default if no sub-parser command is given (but 2.x
does).
To workaround this, we instead check for 'func' attribute
existing on the parsed args. This is a no-op for python 2.x
since it already printed a usage message by default.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
It is used in usage()
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
To allow portability with py3 use the print_function. This
requires python >= 2.6.0
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
The next() method was renamed in python3. Simply avoid calling
it to ensure portability
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
The data/keymaps.csv file is taken from the latest SPICE-GTK
repository. All contributions from this original file in both
SPICE-GTK and GTK-VNC repos were made under Red Hat copyright.
Red Hat grants permission to relicense to dual GPL2 or 3-clause
BSD.
The data/keymap-gen tool is a brand new file.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|