mirror of https://gitee.com/openkylin/libvirt.git
keycodemapdb: Update submodule
This time around it's not enough to just pick the latest commit, because with aed87bb2aa6ed83b49574eb982e3bdd4c36acf17 keycodemapdb renamed the 'rfb' keycode to 'qnum' and we need to accept the new name while maintaining backwards compatibility. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
d45bee449c
commit
ea9b0e580a
|
@ -2733,7 +2733,7 @@ typedef enum {
|
|||
VIR_KEYCODE_SET_XT_KBD = 6,
|
||||
VIR_KEYCODE_SET_USB = 7,
|
||||
VIR_KEYCODE_SET_WIN32 = 8,
|
||||
VIR_KEYCODE_SET_RFB = 9,
|
||||
VIR_KEYCODE_SET_QNUM = 9,
|
||||
|
||||
# ifdef VIR_ENUM_SENTINELS
|
||||
VIR_KEYCODE_SET_LAST
|
||||
|
@ -2745,6 +2745,13 @@ typedef enum {
|
|||
# endif
|
||||
} virKeycodeSet;
|
||||
|
||||
/**
|
||||
* VIR_KEYCODE_SET_RFB:
|
||||
*
|
||||
* Compatibility alias for VIR_KEYCODE_SET_QNUM, which replaced it since 4.2.0.
|
||||
*/
|
||||
# define VIR_KEYCODE_SET_RFB VIR_KEYCODE_SET_QNUM
|
||||
|
||||
/**
|
||||
* VIR_DOMAIN_SEND_KEY_MAX_KEYS:
|
||||
*
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 267157b96c62b5445de9cddd21de42fcd943ffe6
|
||||
Subproject commit 16e5b0787687d8904dad2c026107409eb9bfcb95
|
|
@ -2580,17 +2580,17 @@ static int qemuDomainSendKey(virDomainPtr domain,
|
|||
|
||||
virCheckFlags(0, -1);
|
||||
|
||||
/* translate the keycode to RFB for qemu driver */
|
||||
if (codeset != VIR_KEYCODE_SET_RFB) {
|
||||
/* translate the keycode to QNUM for qemu driver */
|
||||
if (codeset != VIR_KEYCODE_SET_QNUM) {
|
||||
size_t i;
|
||||
int keycode;
|
||||
|
||||
for (i = 0; i < nkeycodes; i++) {
|
||||
keycode = virKeycodeValueTranslate(codeset, VIR_KEYCODE_SET_RFB,
|
||||
keycode = virKeycodeValueTranslate(codeset, VIR_KEYCODE_SET_QNUM,
|
||||
keycodes[i]);
|
||||
if (keycode < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("cannot translate keycode %u of %s codeset to rfb keycode"),
|
||||
_("cannot translate keycode %u of %s codeset to qnum keycode"),
|
||||
keycodes[i],
|
||||
virKeycodeSetTypeToString(codeset));
|
||||
return -1;
|
||||
|
|
|
@ -214,7 +214,7 @@ EXTRA_DIST += \
|
|||
$(NULL)
|
||||
|
||||
|
||||
KEYCODES = linux osx atset1 atset2 atset3 xtkbd usb win32 rfb
|
||||
KEYCODES = linux osx atset1 atset2 atset3 xtkbd usb win32 qnum
|
||||
KEYNAMES = linux osx win32
|
||||
|
||||
KEYTABLES = \
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "virkeycodetable_atset3.h"
|
||||
#include "virkeycodetable_linux.h"
|
||||
#include "virkeycodetable_osx.h"
|
||||
#include "virkeycodetable_rfb.h"
|
||||
#include "virkeycodetable_qnum.h"
|
||||
#include "virkeycodetable_usb.h"
|
||||
#include "virkeycodetable_win32.h"
|
||||
#include "virkeycodetable_xtkbd.h"
|
||||
|
@ -52,7 +52,7 @@ static const unsigned short *virKeymapValues[VIR_KEYCODE_SET_LAST] = {
|
|||
[VIR_KEYCODE_SET_XT_KBD] = virKeyCodeTable_xtkbd,
|
||||
[VIR_KEYCODE_SET_USB] = virKeyCodeTable_usb,
|
||||
[VIR_KEYCODE_SET_WIN32] = virKeyCodeTable_win32,
|
||||
[VIR_KEYCODE_SET_RFB] = virKeyCodeTable_rfb,
|
||||
[VIR_KEYCODE_SET_QNUM] = virKeyCodeTable_qnum,
|
||||
};
|
||||
|
||||
#define VIR_KEYMAP_ENTRY_MAX ARRAY_CARDINALITY(virKeyCodeTable_linux)
|
||||
|
@ -64,7 +64,7 @@ verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyCodeTable_osx));
|
|||
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyCodeTable_xtkbd));
|
||||
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyCodeTable_usb));
|
||||
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyCodeTable_win32));
|
||||
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyCodeTable_rfb));
|
||||
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyCodeTable_qnum));
|
||||
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyNameTable_linux));
|
||||
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyNameTable_osx));
|
||||
verify(VIR_KEYMAP_ENTRY_MAX == ARRAY_CARDINALITY(virKeyNameTable_win32));
|
||||
|
@ -79,7 +79,7 @@ VIR_ENUM_IMPL(virKeycodeSet, VIR_KEYCODE_SET_LAST,
|
|||
"xt_kbd",
|
||||
"usb",
|
||||
"win32",
|
||||
"rfb",
|
||||
"qnum",
|
||||
);
|
||||
|
||||
int virKeycodeValueFromString(virKeycodeSet codeset,
|
||||
|
|
|
@ -54,8 +54,8 @@ static int testKeycodeMapping(const void *data ATTRIBUTE_UNUSED)
|
|||
|
||||
TRANSLATE(LINUX, LINUX, 111, 111);
|
||||
TRANSLATE(LINUX, USB, 111, 76);
|
||||
TRANSLATE(LINUX, RFB, 88, 88);
|
||||
TRANSLATE(LINUX, RFB, 160, 163);
|
||||
TRANSLATE(LINUX, QNUM, 88, 88);
|
||||
TRANSLATE(LINUX, QNUM, 160, 163);
|
||||
TRANSLATE(ATSET2, ATSET3, 131, 55);
|
||||
TRANSLATE(OSX, WIN32, 90, 131);
|
||||
TRANSLATE(OSX, ATSET1, 90, 90);
|
||||
|
|
|
@ -8688,6 +8688,11 @@ cmdSendKey(vshControl *ctl, const vshCmd *cmd)
|
|||
if (vshCommandOptUInt(ctl, cmd, "holdtime", &holdtime) < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* The qnum codeset was originally called rfb, so we need to keep
|
||||
* accepting the old name for backwards compatibility reasons */
|
||||
if (STREQ(codeset_option, "rfb"))
|
||||
codeset_option = "qnum";
|
||||
|
||||
codeset = virKeycodeSetTypeFromString(codeset_option);
|
||||
if (codeset < 0) {
|
||||
vshError(ctl, _("unknown codeset: '%s'"), codeset_option);
|
||||
|
|
|
@ -2249,14 +2249,14 @@ for keyboard input. No symbolic names are provided
|
|||
|
||||
See L<virkeycode-usb(7)>
|
||||
|
||||
=item B<rfb>
|
||||
=item B<qnum>
|
||||
|
||||
The numeric values are those defined by the RFB extension for sending
|
||||
The numeric values are those defined by the QNUM extension for sending
|
||||
raw keycodes. These are a variant on the XT codeset, but extended
|
||||
keycodes have the low bit of the second byte set, instead of the high
|
||||
bit of the first byte. No symbolic names are provided.
|
||||
|
||||
See L<virkeycode-rfb(7)>
|
||||
See L<virkeycode-qnum(7)>
|
||||
|
||||
=back
|
||||
|
||||
|
|
Loading…
Reference in New Issue