From ab8f9d49d62c82a12409475547e4420a46da56ed Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 17 Jan 2018 16:41:15 +0000 Subject: hw: convert ps2 device to keycodemapdb Replace the qcode_to_keycode_set1, qcode_to_keycode_set2, and qcode_to_keycode_set3 tables with automatically generated tables. Missing entries in qcode_to_keycode_set1 now fixed: - Q_KEY_CODE_SYSRQ -> 0x54 - Q_KEY_CODE_PRINT -> 0x54 (NB ignored due to special case) - Q_KEY_CODE_AGAIN -> 0xe005 - Q_KEY_CODE_PROPS -> 0xe006 - Q_KEY_CODE_UNDO -> 0xe007 - Q_KEY_CODE_FRONT -> 0xe00c - Q_KEY_CODE_COPY -> 0xe078 - Q_KEY_CODE_OPEN -> 0x64 - Q_KEY_CODE_PASTE -> 0x65 - Q_KEY_CODE_CUT -> 0xe03c - Q_KEY_CODE_LF -> 0x5b - Q_KEY_CODE_HELP -> 0xe075 - Q_KEY_CODE_COMPOSE -> 0xe05d - Q_KEY_CODE_PAUSE -> 0xe046 - Q_KEY_CODE_KP_EQUALS -> 0x59 And some mistakes corrected: - Q_KEY_CODE_HIRAGANA was mapped to 0x70 (Katakanahiragana) instead of of 0x77 (Hirigana) - Q_KEY_CODE_MENU was incorrectly mapped to the compose scancode (0xe05d) and is now mapped to 0xe01e - Q_KEY_CODE_FIND was mapped to 0xe065 (Search) instead of to 0xe041 (Find) - Q_KEY_CODE_POWER, SLEEP & WAKE had 0x0e instead of 0xe0 as the prefix Missing entries in qcode_to_keycode_set2 now fixed: - Q_KEY_CODE_PRINT -> 0x7f (NB ignored due to special case) - Q_KEY_CODE_COMPOSE -> 0xe02f - Q_KEY_CODE_PAUSE -> 0xe077 - Q_KEY_CODE_KP_EQUALS -> 0x0f And some mistakes corrected: - Q_KEY_CODE_HIRAGANA was mapped to 0x13 (Katakanahiragana) instead of of 0x62 (Hirigana) - Q_KEY_CODE_MENU was incorrectly mapped to the compose scancode (0xe02f) and is now not mapped - Q_KEY_CODE_FIND was mapped to 0xe010 (Search) and is now not mapped. - Q_KEY_CODE_POWER, SLEEP & WAKE had 0x0e instead of 0xe0 as the prefix Missing entries in qcode_to_keycode_set3 now fixed: - Q_KEY_CODE_ASTERISK -> 0x7e - Q_KEY_CODE_SYSRQ -> 0x57 - Q_KEY_CODE_LESS -> 0x13 - Q_KEY_CODE_STOP -> 0x0a - Q_KEY_CODE_AGAIN -> 0x0b - Q_KEY_CODE_PROPS -> 0x0c - Q_KEY_CODE_UNDO -> 0x10 - Q_KEY_CODE_COPY -> 0x18 - Q_KEY_CODE_OPEN -> 0x20 - Q_KEY_CODE_PASTE -> 0x28 - Q_KEY_CODE_FIND -> 0x30 - Q_KEY_CODE_CUT -> 0x38 - Q_KEY_CODE_HELP -> 0x09 - Q_KEY_CODE_COMPOSE -> 0x8d - Q_KEY_CODE_AUDIONEXT -> 0x93 - Q_KEY_CODE_AUDIOPREV -> 0x94 - Q_KEY_CODE_AUDIOSTOP -> 0x98 - Q_KEY_CODE_AUDIOMUTE -> 0x9c - Q_KEY_CODE_VOLUMEUP -> 0x95 - Q_KEY_CODE_VOLUMEDOWN -> 0x9d - Q_KEY_CODE_CALCULATOR -> 0xa3 - Q_KEY_CODE_AC_HOME -> 0x97 And some mistakes corrected: - Q_KEY_CODE_MENU was incorrectly mapped to the compose scancode (0x8d) and is now 0x91 Signed-off-by: Daniel P. Berrange Message-id: 20180117164118.8510-2-berrange@redhat.com Signed-off-by: Gerd Hoffmann --- include/ui/input.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/ui/input.h b/include/ui/input.h index 05aab2d..cffeb1c 100644 --- a/include/ui/input.h +++ b/include/ui/input.h @@ -74,6 +74,15 @@ extern const guint16 qemu_input_map_atset1_to_qcode[]; extern const guint qemu_input_map_linux_to_qcode_len; extern const guint16 qemu_input_map_linux_to_qcode[]; +extern const guint qemu_input_map_qcode_to_atset1_len; +extern const guint16 qemu_input_map_qcode_to_atset1[]; + +extern const guint qemu_input_map_qcode_to_atset2_len; +extern const guint16 qemu_input_map_qcode_to_atset2[]; + +extern const guint qemu_input_map_qcode_to_atset3_len; +extern const guint16 qemu_input_map_qcode_to_atset3[]; + extern const guint qemu_input_map_qcode_to_qnum_len; extern const guint16 qemu_input_map_qcode_to_qnum[]; -- cgit v1.1 From e709a61a8fe1076a487376fd657544418a38ba06 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 17 Jan 2018 16:41:16 +0000 Subject: hw: convert the escc device to keycodemapdb Replace the qcode_to_keycode table with automatically generated tables. Missing entries in qcode_to_keycode now fixed: - Q_KEY_CODE_KP_COMMA -> 0x2d Signed-off-by: Daniel P. Berrange Message-id: 20180117164118.8510-3-berrange@redhat.com Signed-off-by: Gerd Hoffmann --- include/ui/input.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/ui/input.h b/include/ui/input.h index cffeb1c..7d6c922 100644 --- a/include/ui/input.h +++ b/include/ui/input.h @@ -86,6 +86,9 @@ extern const guint16 qemu_input_map_qcode_to_atset3[]; extern const guint qemu_input_map_qcode_to_qnum_len; extern const guint16 qemu_input_map_qcode_to_qnum[]; +extern const guint qemu_input_map_qcode_to_sun_len; +extern const guint16 qemu_input_map_qcode_to_sun[]; + extern const guint qemu_input_map_qnum_to_qcode_len; extern const guint16 qemu_input_map_qnum_to_qcode[]; -- cgit v1.1 From 5a15e6b1cafb89a2c931195634a4908a69160278 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 17 Jan 2018 16:41:17 +0000 Subject: ui: fix alphabetical ordering of keymaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The qcode-to-linux keymaps was accidentally added in the wrong place by commit de80d78594b4c3767a12d8d42debcf12cbf85a5b Author: Owen Smith Date: Fri Nov 3 11:56:28 2017 +0000 ui: generate qcode to linux mappings breaking the alphabetical ordering of keymaps Signed-off-by: Daniel P. Berrange Reviewed-by: Philippe Mathieu-Daudé Message-id: 20180117164118.8510-4-berrange@redhat.com Signed-off-by: Gerd Hoffmann --- include/ui/input.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/ui/input.h b/include/ui/input.h index 7d6c922..ceb22b8 100644 --- a/include/ui/input.h +++ b/include/ui/input.h @@ -83,6 +83,9 @@ extern const guint16 qemu_input_map_qcode_to_atset2[]; extern const guint qemu_input_map_qcode_to_atset3_len; extern const guint16 qemu_input_map_qcode_to_atset3[]; +extern const guint qemu_input_map_qcode_to_linux_len; +extern const guint16 qemu_input_map_qcode_to_linux[]; + extern const guint qemu_input_map_qcode_to_qnum_len; extern const guint16 qemu_input_map_qcode_to_qnum[]; @@ -92,9 +95,6 @@ extern const guint16 qemu_input_map_qcode_to_sun[]; extern const guint qemu_input_map_qnum_to_qcode_len; extern const guint16 qemu_input_map_qnum_to_qcode[]; -extern const guint qemu_input_map_qcode_to_linux_len; -extern const guint16 qemu_input_map_qcode_to_linux[]; - extern const guint qemu_input_map_usb_to_qcode_len; extern const guint16 qemu_input_map_usb_to_qcode[]; -- cgit v1.1