Send qemu extended key events
parent
04659825a6
commit
4493e68115
|
@ -50,7 +50,7 @@ int vnc_client_process(struct vnc_client* self);
|
|||
void vnc_client_send_pointer_event(struct vnc_client* self, int x, int y,
|
||||
uint32_t button_mask);
|
||||
void vnc_client_send_keyboard_event(struct vnc_client* self, uint32_t symbol,
|
||||
bool is_pressed);
|
||||
uint32_t code, bool is_pressed);
|
||||
void vnc_client_set_encodings(struct vnc_client* self, const char* encodings);
|
||||
void vnc_client_set_quality_level(struct vnc_client* self, int value);
|
||||
void vnc_client_set_compression_level(struct vnc_client* self, int value);
|
||||
|
|
|
@ -60,6 +60,7 @@ sources = [
|
|||
'src/keyboard.c',
|
||||
'src/vnc.c',
|
||||
'src/strlcpy.c',
|
||||
'src/evdev-to-qnum.c',
|
||||
]
|
||||
|
||||
dependencies = [
|
||||
|
|
|
@ -0,0 +1,245 @@
|
|||
/*
|
||||
* This file is auto-generated from keymaps.csv
|
||||
* Database checksum sha256(76d68c10e97d37fe2ea459e210125ae41796253fb217e900bf2983ade13a7920)
|
||||
* To re-generate, run:
|
||||
* keymap-gen code-map --lang=stdc keymaps.csv linux qnum
|
||||
*/
|
||||
const unsigned short code_map_linux_to_qnum[525] = {
|
||||
[0x1] = 0x1, /* linux:1 (KEY_ESC) -> linux:1 (KEY_ESC) -> qnum:1 */
|
||||
[0x2] = 0x2, /* linux:2 (KEY_1) -> linux:2 (KEY_1) -> qnum:2 */
|
||||
[0x3] = 0x3, /* linux:3 (KEY_2) -> linux:3 (KEY_2) -> qnum:3 */
|
||||
[0x4] = 0x4, /* linux:4 (KEY_3) -> linux:4 (KEY_3) -> qnum:4 */
|
||||
[0x5] = 0x5, /* linux:5 (KEY_4) -> linux:5 (KEY_4) -> qnum:5 */
|
||||
[0x6] = 0x6, /* linux:6 (KEY_5) -> linux:6 (KEY_5) -> qnum:6 */
|
||||
[0x7] = 0x7, /* linux:7 (KEY_6) -> linux:7 (KEY_6) -> qnum:7 */
|
||||
[0x8] = 0x8, /* linux:8 (KEY_7) -> linux:8 (KEY_7) -> qnum:8 */
|
||||
[0x9] = 0x9, /* linux:9 (KEY_8) -> linux:9 (KEY_8) -> qnum:9 */
|
||||
[0xa] = 0xa, /* linux:10 (KEY_9) -> linux:10 (KEY_9) -> qnum:10 */
|
||||
[0xb] = 0xb, /* linux:11 (KEY_0) -> linux:11 (KEY_0) -> qnum:11 */
|
||||
[0xc] = 0xc, /* linux:12 (KEY_MINUS) -> linux:12 (KEY_MINUS) -> qnum:12 */
|
||||
[0xd] = 0xd, /* linux:13 (KEY_EQUAL) -> linux:13 (KEY_EQUAL) -> qnum:13 */
|
||||
[0xe] = 0xe, /* linux:14 (KEY_BACKSPACE) -> linux:14 (KEY_BACKSPACE) -> qnum:14 */
|
||||
[0xf] = 0xf, /* linux:15 (KEY_TAB) -> linux:15 (KEY_TAB) -> qnum:15 */
|
||||
[0x10] = 0x10, /* linux:16 (KEY_Q) -> linux:16 (KEY_Q) -> qnum:16 */
|
||||
[0x11] = 0x11, /* linux:17 (KEY_W) -> linux:17 (KEY_W) -> qnum:17 */
|
||||
[0x12] = 0x12, /* linux:18 (KEY_E) -> linux:18 (KEY_E) -> qnum:18 */
|
||||
[0x13] = 0x13, /* linux:19 (KEY_R) -> linux:19 (KEY_R) -> qnum:19 */
|
||||
[0x14] = 0x14, /* linux:20 (KEY_T) -> linux:20 (KEY_T) -> qnum:20 */
|
||||
[0x15] = 0x15, /* linux:21 (KEY_Y) -> linux:21 (KEY_Y) -> qnum:21 */
|
||||
[0x16] = 0x16, /* linux:22 (KEY_U) -> linux:22 (KEY_U) -> qnum:22 */
|
||||
[0x17] = 0x17, /* linux:23 (KEY_I) -> linux:23 (KEY_I) -> qnum:23 */
|
||||
[0x18] = 0x18, /* linux:24 (KEY_O) -> linux:24 (KEY_O) -> qnum:24 */
|
||||
[0x19] = 0x19, /* linux:25 (KEY_P) -> linux:25 (KEY_P) -> qnum:25 */
|
||||
[0x1a] = 0x1a, /* linux:26 (KEY_LEFTBRACE) -> linux:26 (KEY_LEFTBRACE) -> qnum:26 */
|
||||
[0x1b] = 0x1b, /* linux:27 (KEY_RIGHTBRACE) -> linux:27 (KEY_RIGHTBRACE) -> qnum:27 */
|
||||
[0x1c] = 0x1c, /* linux:28 (KEY_ENTER) -> linux:28 (KEY_ENTER) -> qnum:28 */
|
||||
[0x1d] = 0x1d, /* linux:29 (KEY_LEFTCTRL) -> linux:29 (KEY_LEFTCTRL) -> qnum:29 */
|
||||
[0x1e] = 0x1e, /* linux:30 (KEY_A) -> linux:30 (KEY_A) -> qnum:30 */
|
||||
[0x1f] = 0x1f, /* linux:31 (KEY_S) -> linux:31 (KEY_S) -> qnum:31 */
|
||||
[0x20] = 0x20, /* linux:32 (KEY_D) -> linux:32 (KEY_D) -> qnum:32 */
|
||||
[0x21] = 0x21, /* linux:33 (KEY_F) -> linux:33 (KEY_F) -> qnum:33 */
|
||||
[0x22] = 0x22, /* linux:34 (KEY_G) -> linux:34 (KEY_G) -> qnum:34 */
|
||||
[0x23] = 0x23, /* linux:35 (KEY_H) -> linux:35 (KEY_H) -> qnum:35 */
|
||||
[0x24] = 0x24, /* linux:36 (KEY_J) -> linux:36 (KEY_J) -> qnum:36 */
|
||||
[0x25] = 0x25, /* linux:37 (KEY_K) -> linux:37 (KEY_K) -> qnum:37 */
|
||||
[0x26] = 0x26, /* linux:38 (KEY_L) -> linux:38 (KEY_L) -> qnum:38 */
|
||||
[0x27] = 0x27, /* linux:39 (KEY_SEMICOLON) -> linux:39 (KEY_SEMICOLON) -> qnum:39 */
|
||||
[0x28] = 0x28, /* linux:40 (KEY_APOSTROPHE) -> linux:40 (KEY_APOSTROPHE) -> qnum:40 */
|
||||
[0x29] = 0x29, /* linux:41 (KEY_GRAVE) -> linux:41 (KEY_GRAVE) -> qnum:41 */
|
||||
[0x2a] = 0x2a, /* linux:42 (KEY_LEFTSHIFT) -> linux:42 (KEY_LEFTSHIFT) -> qnum:42 */
|
||||
[0x2b] = 0x2b, /* linux:43 (KEY_BACKSLASH) -> linux:43 (KEY_BACKSLASH) -> qnum:43 */
|
||||
[0x2c] = 0x2c, /* linux:44 (KEY_Z) -> linux:44 (KEY_Z) -> qnum:44 */
|
||||
[0x2d] = 0x2d, /* linux:45 (KEY_X) -> linux:45 (KEY_X) -> qnum:45 */
|
||||
[0x2e] = 0x2e, /* linux:46 (KEY_C) -> linux:46 (KEY_C) -> qnum:46 */
|
||||
[0x2f] = 0x2f, /* linux:47 (KEY_V) -> linux:47 (KEY_V) -> qnum:47 */
|
||||
[0x30] = 0x30, /* linux:48 (KEY_B) -> linux:48 (KEY_B) -> qnum:48 */
|
||||
[0x31] = 0x31, /* linux:49 (KEY_N) -> linux:49 (KEY_N) -> qnum:49 */
|
||||
[0x32] = 0x32, /* linux:50 (KEY_M) -> linux:50 (KEY_M) -> qnum:50 */
|
||||
[0x33] = 0x33, /* linux:51 (KEY_COMMA) -> linux:51 (KEY_COMMA) -> qnum:51 */
|
||||
[0x34] = 0x34, /* linux:52 (KEY_DOT) -> linux:52 (KEY_DOT) -> qnum:52 */
|
||||
[0x35] = 0x35, /* linux:53 (KEY_SLASH) -> linux:53 (KEY_SLASH) -> qnum:53 */
|
||||
[0x36] = 0x36, /* linux:54 (KEY_RIGHTSHIFT) -> linux:54 (KEY_RIGHTSHIFT) -> qnum:54 */
|
||||
[0x37] = 0x37, /* linux:55 (KEY_KPASTERISK) -> linux:55 (KEY_KPASTERISK) -> qnum:55 */
|
||||
[0x38] = 0x38, /* linux:56 (KEY_LEFTALT) -> linux:56 (KEY_LEFTALT) -> qnum:56 */
|
||||
[0x39] = 0x39, /* linux:57 (KEY_SPACE) -> linux:57 (KEY_SPACE) -> qnum:57 */
|
||||
[0x3a] = 0x3a, /* linux:58 (KEY_CAPSLOCK) -> linux:58 (KEY_CAPSLOCK) -> qnum:58 */
|
||||
[0x3b] = 0x3b, /* linux:59 (KEY_F1) -> linux:59 (KEY_F1) -> qnum:59 */
|
||||
[0x3c] = 0x3c, /* linux:60 (KEY_F2) -> linux:60 (KEY_F2) -> qnum:60 */
|
||||
[0x3d] = 0x3d, /* linux:61 (KEY_F3) -> linux:61 (KEY_F3) -> qnum:61 */
|
||||
[0x3e] = 0x3e, /* linux:62 (KEY_F4) -> linux:62 (KEY_F4) -> qnum:62 */
|
||||
[0x3f] = 0x3f, /* linux:63 (KEY_F5) -> linux:63 (KEY_F5) -> qnum:63 */
|
||||
[0x40] = 0x40, /* linux:64 (KEY_F6) -> linux:64 (KEY_F6) -> qnum:64 */
|
||||
[0x41] = 0x41, /* linux:65 (KEY_F7) -> linux:65 (KEY_F7) -> qnum:65 */
|
||||
[0x42] = 0x42, /* linux:66 (KEY_F8) -> linux:66 (KEY_F8) -> qnum:66 */
|
||||
[0x43] = 0x43, /* linux:67 (KEY_F9) -> linux:67 (KEY_F9) -> qnum:67 */
|
||||
[0x44] = 0x44, /* linux:68 (KEY_F10) -> linux:68 (KEY_F10) -> qnum:68 */
|
||||
[0x45] = 0x45, /* linux:69 (KEY_NUMLOCK) -> linux:69 (KEY_NUMLOCK) -> qnum:69 */
|
||||
[0x46] = 0x46, /* linux:70 (KEY_SCROLLLOCK) -> linux:70 (KEY_SCROLLLOCK) -> qnum:70 */
|
||||
[0x47] = 0x47, /* linux:71 (KEY_KP7) -> linux:71 (KEY_KP7) -> qnum:71 */
|
||||
[0x48] = 0x48, /* linux:72 (KEY_KP8) -> linux:72 (KEY_KP8) -> qnum:72 */
|
||||
[0x49] = 0x49, /* linux:73 (KEY_KP9) -> linux:73 (KEY_KP9) -> qnum:73 */
|
||||
[0x4a] = 0x4a, /* linux:74 (KEY_KPMINUS) -> linux:74 (KEY_KPMINUS) -> qnum:74 */
|
||||
[0x4b] = 0x4b, /* linux:75 (KEY_KP4) -> linux:75 (KEY_KP4) -> qnum:75 */
|
||||
[0x4c] = 0x4c, /* linux:76 (KEY_KP5) -> linux:76 (KEY_KP5) -> qnum:76 */
|
||||
[0x4d] = 0x4d, /* linux:77 (KEY_KP6) -> linux:77 (KEY_KP6) -> qnum:77 */
|
||||
[0x4e] = 0x4e, /* linux:78 (KEY_KPPLUS) -> linux:78 (KEY_KPPLUS) -> qnum:78 */
|
||||
[0x4f] = 0x4f, /* linux:79 (KEY_KP1) -> linux:79 (KEY_KP1) -> qnum:79 */
|
||||
[0x50] = 0x50, /* linux:80 (KEY_KP2) -> linux:80 (KEY_KP2) -> qnum:80 */
|
||||
[0x51] = 0x51, /* linux:81 (KEY_KP3) -> linux:81 (KEY_KP3) -> qnum:81 */
|
||||
[0x52] = 0x52, /* linux:82 (KEY_KP0) -> linux:82 (KEY_KP0) -> qnum:82 */
|
||||
[0x53] = 0x53, /* linux:83 (KEY_KPDOT) -> linux:83 (KEY_KPDOT) -> qnum:83 */
|
||||
[0x54] = 0x54, /* linux:84 (unnamed) -> linux:84 (unnamed) -> qnum:84 */
|
||||
[0x55] = 0x76, /* linux:85 (KEY_ZENKAKUHANKAKU) -> linux:85 (KEY_ZENKAKUHANKAKU) -> qnum:118 */
|
||||
[0x56] = 0x56, /* linux:86 (KEY_102ND) -> linux:86 (KEY_102ND) -> qnum:86 */
|
||||
[0x57] = 0x57, /* linux:87 (KEY_F11) -> linux:87 (KEY_F11) -> qnum:87 */
|
||||
[0x58] = 0x58, /* linux:88 (KEY_F12) -> linux:88 (KEY_F12) -> qnum:88 */
|
||||
[0x59] = 0x73, /* linux:89 (KEY_RO) -> linux:89 (KEY_RO) -> qnum:115 */
|
||||
[0x5a] = 0x78, /* linux:90 (KEY_KATAKANA) -> linux:90 (KEY_KATAKANA) -> qnum:120 */
|
||||
[0x5b] = 0x77, /* linux:91 (KEY_HIRAGANA) -> linux:91 (KEY_HIRAGANA) -> qnum:119 */
|
||||
[0x5c] = 0x79, /* linux:92 (KEY_HENKAN) -> linux:92 (KEY_HENKAN) -> qnum:121 */
|
||||
[0x5d] = 0x70, /* linux:93 (KEY_KATAKANAHIRAGANA) -> linux:93 (KEY_KATAKANAHIRAGANA) -> qnum:112 */
|
||||
[0x5e] = 0x7b, /* linux:94 (KEY_MUHENKAN) -> linux:94 (KEY_MUHENKAN) -> qnum:123 */
|
||||
[0x5f] = 0x5c, /* linux:95 (KEY_KPJPCOMMA) -> linux:95 (KEY_KPJPCOMMA) -> qnum:92 */
|
||||
[0x60] = 0x9c, /* linux:96 (KEY_KPENTER) -> linux:96 (KEY_KPENTER) -> qnum:156 */
|
||||
[0x61] = 0x9d, /* linux:97 (KEY_RIGHTCTRL) -> linux:97 (KEY_RIGHTCTRL) -> qnum:157 */
|
||||
[0x62] = 0xb5, /* linux:98 (KEY_KPSLASH) -> linux:98 (KEY_KPSLASH) -> qnum:181 */
|
||||
[0x63] = 0x54, /* linux:99 (KEY_SYSRQ) -> linux:99 (KEY_SYSRQ) -> qnum:84 */
|
||||
[0x64] = 0xb8, /* linux:100 (KEY_RIGHTALT) -> linux:100 (KEY_RIGHTALT) -> qnum:184 */
|
||||
[0x65] = 0x5b, /* linux:101 (KEY_LINEFEED) -> linux:101 (KEY_LINEFEED) -> qnum:91 */
|
||||
[0x66] = 0xc7, /* linux:102 (KEY_HOME) -> linux:102 (KEY_HOME) -> qnum:199 */
|
||||
[0x67] = 0xc8, /* linux:103 (KEY_UP) -> linux:103 (KEY_UP) -> qnum:200 */
|
||||
[0x68] = 0xc9, /* linux:104 (KEY_PAGEUP) -> linux:104 (KEY_PAGEUP) -> qnum:201 */
|
||||
[0x69] = 0xcb, /* linux:105 (KEY_LEFT) -> linux:105 (KEY_LEFT) -> qnum:203 */
|
||||
[0x6a] = 0xcd, /* linux:106 (KEY_RIGHT) -> linux:106 (KEY_RIGHT) -> qnum:205 */
|
||||
[0x6b] = 0xcf, /* linux:107 (KEY_END) -> linux:107 (KEY_END) -> qnum:207 */
|
||||
[0x6c] = 0xd0, /* linux:108 (KEY_DOWN) -> linux:108 (KEY_DOWN) -> qnum:208 */
|
||||
[0x6d] = 0xd1, /* linux:109 (KEY_PAGEDOWN) -> linux:109 (KEY_PAGEDOWN) -> qnum:209 */
|
||||
[0x6e] = 0xd2, /* linux:110 (KEY_INSERT) -> linux:110 (KEY_INSERT) -> qnum:210 */
|
||||
[0x6f] = 0xd3, /* linux:111 (KEY_DELETE) -> linux:111 (KEY_DELETE) -> qnum:211 */
|
||||
[0x70] = 0xef, /* linux:112 (KEY_MACRO) -> linux:112 (KEY_MACRO) -> qnum:239 */
|
||||
[0x71] = 0xa0, /* linux:113 (KEY_MUTE) -> linux:113 (KEY_MUTE) -> qnum:160 */
|
||||
[0x72] = 0xae, /* linux:114 (KEY_VOLUMEDOWN) -> linux:114 (KEY_VOLUMEDOWN) -> qnum:174 */
|
||||
[0x73] = 0xb0, /* linux:115 (KEY_VOLUMEUP) -> linux:115 (KEY_VOLUMEUP) -> qnum:176 */
|
||||
[0x74] = 0xde, /* linux:116 (KEY_POWER) -> linux:116 (KEY_POWER) -> qnum:222 */
|
||||
[0x75] = 0x59, /* linux:117 (KEY_KPEQUAL) -> linux:117 (KEY_KPEQUAL) -> qnum:89 */
|
||||
[0x76] = 0xce, /* linux:118 (KEY_KPPLUSMINUS) -> linux:118 (KEY_KPPLUSMINUS) -> qnum:206 */
|
||||
[0x77] = 0xc6, /* linux:119 (KEY_PAUSE) -> linux:119 (KEY_PAUSE) -> qnum:198 */
|
||||
[0x78] = 0x8b, /* linux:120 (KEY_SCALE) -> linux:120 (KEY_SCALE) -> qnum:139 */
|
||||
[0x79] = 0x7e, /* linux:121 (KEY_KPCOMMA) -> linux:121 (KEY_KPCOMMA) -> qnum:126 */
|
||||
[0x7a] = 0x72, /* linux:122 (KEY_HANGEUL) -> linux:122 (KEY_HANGEUL) -> qnum:114 */
|
||||
[0x7b] = 0x71, /* linux:123 (KEY_HANJA) -> linux:123 (KEY_HANJA) -> qnum:113 */
|
||||
[0x7c] = 0x7d, /* linux:124 (KEY_YEN) -> linux:124 (KEY_YEN) -> qnum:125 */
|
||||
[0x7d] = 0xdb, /* linux:125 (KEY_LEFTMETA) -> linux:125 (KEY_LEFTMETA) -> qnum:219 */
|
||||
[0x7e] = 0xdc, /* linux:126 (KEY_RIGHTMETA) -> linux:126 (KEY_RIGHTMETA) -> qnum:220 */
|
||||
[0x7f] = 0xdd, /* linux:127 (KEY_COMPOSE) -> linux:127 (KEY_COMPOSE) -> qnum:221 */
|
||||
[0x80] = 0xe8, /* linux:128 (KEY_STOP) -> linux:128 (KEY_STOP) -> qnum:232 */
|
||||
[0x81] = 0x85, /* linux:129 (KEY_AGAIN) -> linux:129 (KEY_AGAIN) -> qnum:133 */
|
||||
[0x82] = 0x86, /* linux:130 (KEY_PROPS) -> linux:130 (KEY_PROPS) -> qnum:134 */
|
||||
[0x83] = 0x87, /* linux:131 (KEY_UNDO) -> linux:131 (KEY_UNDO) -> qnum:135 */
|
||||
[0x84] = 0x8c, /* linux:132 (KEY_FRONT) -> linux:132 (KEY_FRONT) -> qnum:140 */
|
||||
[0x85] = 0xf8, /* linux:133 (KEY_COPY) -> linux:133 (KEY_COPY) -> qnum:248 */
|
||||
[0x86] = 0x64, /* linux:134 (KEY_OPEN) -> linux:134 (KEY_OPEN) -> qnum:100 */
|
||||
[0x87] = 0x65, /* linux:135 (KEY_PASTE) -> linux:135 (KEY_PASTE) -> qnum:101 */
|
||||
[0x88] = 0xc1, /* linux:136 (KEY_FIND) -> linux:136 (KEY_FIND) -> qnum:193 */
|
||||
[0x89] = 0xbc, /* linux:137 (KEY_CUT) -> linux:137 (KEY_CUT) -> qnum:188 */
|
||||
[0x8a] = 0xf5, /* linux:138 (KEY_HELP) -> linux:138 (KEY_HELP) -> qnum:245 */
|
||||
[0x8b] = 0x9e, /* linux:139 (KEY_MENU) -> linux:139 (KEY_MENU) -> qnum:158 */
|
||||
[0x8c] = 0xa1, /* linux:140 (KEY_CALC) -> linux:140 (KEY_CALC) -> qnum:161 */
|
||||
[0x8d] = 0x66, /* linux:141 (KEY_SETUP) -> linux:141 (KEY_SETUP) -> qnum:102 */
|
||||
[0x8e] = 0xdf, /* linux:142 (KEY_SLEEP) -> linux:142 (KEY_SLEEP) -> qnum:223 */
|
||||
[0x8f] = 0xe3, /* linux:143 (KEY_WAKEUP) -> linux:143 (KEY_WAKEUP) -> qnum:227 */
|
||||
[0x90] = 0x67, /* linux:144 (KEY_FILE) -> linux:144 (KEY_FILE) -> qnum:103 */
|
||||
[0x91] = 0x68, /* linux:145 (KEY_SENDFILE) -> linux:145 (KEY_SENDFILE) -> qnum:104 */
|
||||
[0x92] = 0x69, /* linux:146 (KEY_DELETEFILE) -> linux:146 (KEY_DELETEFILE) -> qnum:105 */
|
||||
[0x93] = 0x93, /* linux:147 (KEY_XFER) -> linux:147 (KEY_XFER) -> qnum:147 */
|
||||
[0x94] = 0x9f, /* linux:148 (KEY_PROG1) -> linux:148 (KEY_PROG1) -> qnum:159 */
|
||||
[0x95] = 0x97, /* linux:149 (KEY_PROG2) -> linux:149 (KEY_PROG2) -> qnum:151 */
|
||||
[0x96] = 0x82, /* linux:150 (KEY_WWW) -> linux:150 (KEY_WWW) -> qnum:130 */
|
||||
[0x97] = 0x6a, /* linux:151 (KEY_MSDOS) -> linux:151 (KEY_MSDOS) -> qnum:106 */
|
||||
[0x98] = 0x92, /* linux:152 (KEY_SCREENLOCK) -> linux:152 (KEY_SCREENLOCK) -> qnum:146 */
|
||||
[0x99] = 0x6b, /* linux:153 (KEY_DIRECTION) -> linux:153 (KEY_DIRECTION) -> qnum:107 */
|
||||
[0x9a] = 0xa6, /* linux:154 (KEY_CYCLEWINDOWS) -> linux:154 (KEY_CYCLEWINDOWS) -> qnum:166 */
|
||||
[0x9b] = 0xec, /* linux:155 (KEY_MAIL) -> linux:155 (KEY_MAIL) -> qnum:236 */
|
||||
[0x9c] = 0xe6, /* linux:156 (KEY_BOOKMARKS) -> linux:156 (KEY_BOOKMARKS) -> qnum:230 */
|
||||
[0x9d] = 0xeb, /* linux:157 (KEY_COMPUTER) -> linux:157 (KEY_COMPUTER) -> qnum:235 */
|
||||
[0x9e] = 0xea, /* linux:158 (KEY_BACK) -> linux:158 (KEY_BACK) -> qnum:234 */
|
||||
[0x9f] = 0xe9, /* linux:159 (KEY_FORWARD) -> linux:159 (KEY_FORWARD) -> qnum:233 */
|
||||
[0xa0] = 0xa3, /* linux:160 (KEY_CLOSECD) -> linux:160 (KEY_CLOSECD) -> qnum:163 */
|
||||
[0xa1] = 0x6c, /* linux:161 (KEY_EJECTCD) -> linux:161 (KEY_EJECTCD) -> qnum:108 */
|
||||
[0xa2] = 0xfd, /* linux:162 (KEY_EJECTCLOSECD) -> linux:162 (KEY_EJECTCLOSECD) -> qnum:253 */
|
||||
[0xa3] = 0x99, /* linux:163 (KEY_NEXTSONG) -> linux:163 (KEY_NEXTSONG) -> qnum:153 */
|
||||
[0xa4] = 0xa2, /* linux:164 (KEY_PLAYPAUSE) -> linux:164 (KEY_PLAYPAUSE) -> qnum:162 */
|
||||
[0xa5] = 0x90, /* linux:165 (KEY_PREVIOUSSONG) -> linux:165 (KEY_PREVIOUSSONG) -> qnum:144 */
|
||||
[0xa6] = 0xa4, /* linux:166 (KEY_STOPCD) -> linux:166 (KEY_STOPCD) -> qnum:164 */
|
||||
[0xa7] = 0xb1, /* linux:167 (KEY_RECORD) -> linux:167 (KEY_RECORD) -> qnum:177 */
|
||||
[0xa8] = 0x98, /* linux:168 (KEY_REWIND) -> linux:168 (KEY_REWIND) -> qnum:152 */
|
||||
[0xa9] = 0x63, /* linux:169 (KEY_PHONE) -> linux:169 (KEY_PHONE) -> qnum:99 */
|
||||
[0xab] = 0x81, /* linux:171 (KEY_CONFIG) -> linux:171 (KEY_CONFIG) -> qnum:129 */
|
||||
[0xac] = 0xb2, /* linux:172 (KEY_HOMEPAGE) -> linux:172 (KEY_HOMEPAGE) -> qnum:178 */
|
||||
[0xad] = 0xe7, /* linux:173 (KEY_REFRESH) -> linux:173 (KEY_REFRESH) -> qnum:231 */
|
||||
[0xb0] = 0x88, /* linux:176 (KEY_EDIT) -> linux:176 (KEY_EDIT) -> qnum:136 */
|
||||
[0xb1] = 0x75, /* linux:177 (KEY_SCROLLUP) -> linux:177 (KEY_SCROLLUP) -> qnum:117 */
|
||||
[0xb2] = 0x8f, /* linux:178 (KEY_SCROLLDOWN) -> linux:178 (KEY_SCROLLDOWN) -> qnum:143 */
|
||||
[0xb3] = 0xf6, /* linux:179 (KEY_KPLEFTPAREN) -> linux:179 (KEY_KPLEFTPAREN) -> qnum:246 */
|
||||
[0xb4] = 0xfb, /* linux:180 (KEY_KPRIGHTPAREN) -> linux:180 (KEY_KPRIGHTPAREN) -> qnum:251 */
|
||||
[0xb5] = 0x89, /* linux:181 (KEY_NEW) -> linux:181 (KEY_NEW) -> qnum:137 */
|
||||
[0xb6] = 0x8a, /* linux:182 (KEY_REDO) -> linux:182 (KEY_REDO) -> qnum:138 */
|
||||
[0xb7] = 0x5d, /* linux:183 (KEY_F13) -> linux:183 (KEY_F13) -> qnum:93 */
|
||||
[0xb8] = 0x5e, /* linux:184 (KEY_F14) -> linux:184 (KEY_F14) -> qnum:94 */
|
||||
[0xb9] = 0x5f, /* linux:185 (KEY_F15) -> linux:185 (KEY_F15) -> qnum:95 */
|
||||
[0xba] = 0x55, /* linux:186 (KEY_F16) -> linux:186 (KEY_F16) -> qnum:85 */
|
||||
[0xbb] = 0x83, /* linux:187 (KEY_F17) -> linux:187 (KEY_F17) -> qnum:131 */
|
||||
[0xbc] = 0xf7, /* linux:188 (KEY_F18) -> linux:188 (KEY_F18) -> qnum:247 */
|
||||
[0xbd] = 0x84, /* linux:189 (KEY_F19) -> linux:189 (KEY_F19) -> qnum:132 */
|
||||
[0xbe] = 0x5a, /* linux:190 (KEY_F20) -> linux:190 (KEY_F20) -> qnum:90 */
|
||||
[0xbf] = 0x74, /* linux:191 (KEY_F21) -> linux:191 (KEY_F21) -> qnum:116 */
|
||||
[0xc0] = 0xf9, /* linux:192 (KEY_F22) -> linux:192 (KEY_F22) -> qnum:249 */
|
||||
[0xc1] = 0x6d, /* linux:193 (KEY_F23) -> linux:193 (KEY_F23) -> qnum:109 */
|
||||
[0xc2] = 0x6f, /* linux:194 (KEY_F24) -> linux:194 (KEY_F24) -> qnum:111 */
|
||||
[0xc3] = 0x95, /* linux:195 (unnamed) -> linux:195 (unnamed) -> qnum:149 */
|
||||
[0xc4] = 0x96, /* linux:196 (unnamed) -> linux:196 (unnamed) -> qnum:150 */
|
||||
[0xc5] = 0x9a, /* linux:197 (unnamed) -> linux:197 (unnamed) -> qnum:154 */
|
||||
[0xc6] = 0x9b, /* linux:198 (unnamed) -> linux:198 (unnamed) -> qnum:155 */
|
||||
[0xc7] = 0xa7, /* linux:199 (unnamed) -> linux:199 (unnamed) -> qnum:167 */
|
||||
[0xc8] = 0xa8, /* linux:200 (KEY_PLAYCD) -> linux:200 (KEY_PLAYCD) -> qnum:168 */
|
||||
[0xc9] = 0xa9, /* linux:201 (KEY_PAUSECD) -> linux:201 (KEY_PAUSECD) -> qnum:169 */
|
||||
[0xca] = 0xab, /* linux:202 (KEY_PROG3) -> linux:202 (KEY_PROG3) -> qnum:171 */
|
||||
[0xcb] = 0xac, /* linux:203 (KEY_PROG4) -> linux:203 (KEY_PROG4) -> qnum:172 */
|
||||
[0xcc] = 0xad, /* linux:204 (KEY_DASHBOARD) -> linux:204 (KEY_DASHBOARD) -> qnum:173 */
|
||||
[0xcd] = 0xa5, /* linux:205 (KEY_SUSPEND) -> linux:205 (KEY_SUSPEND) -> qnum:165 */
|
||||
[0xce] = 0xaf, /* linux:206 (KEY_CLOSE) -> linux:206 (KEY_CLOSE) -> qnum:175 */
|
||||
[0xcf] = 0xb3, /* linux:207 (KEY_PLAY) -> linux:207 (KEY_PLAY) -> qnum:179 */
|
||||
[0xd0] = 0xb4, /* linux:208 (KEY_FASTFORWARD) -> linux:208 (KEY_FASTFORWARD) -> qnum:180 */
|
||||
[0xd1] = 0xb6, /* linux:209 (KEY_BASSBOOST) -> linux:209 (KEY_BASSBOOST) -> qnum:182 */
|
||||
[0xd2] = 0xb9, /* linux:210 (KEY_PRINT) -> linux:210 (KEY_PRINT) -> qnum:185 */
|
||||
[0xd3] = 0xba, /* linux:211 (KEY_HP) -> linux:211 (KEY_HP) -> qnum:186 */
|
||||
[0xd4] = 0xbb, /* linux:212 (KEY_CAMERA) -> linux:212 (KEY_CAMERA) -> qnum:187 */
|
||||
[0xd5] = 0xbd, /* linux:213 (KEY_SOUND) -> linux:213 (KEY_SOUND) -> qnum:189 */
|
||||
[0xd6] = 0xbe, /* linux:214 (KEY_QUESTION) -> linux:214 (KEY_QUESTION) -> qnum:190 */
|
||||
[0xd7] = 0xbf, /* linux:215 (KEY_EMAIL) -> linux:215 (KEY_EMAIL) -> qnum:191 */
|
||||
[0xd8] = 0xc0, /* linux:216 (KEY_CHAT) -> linux:216 (KEY_CHAT) -> qnum:192 */
|
||||
[0xd9] = 0xe5, /* linux:217 (KEY_SEARCH) -> linux:217 (KEY_SEARCH) -> qnum:229 */
|
||||
[0xda] = 0xc2, /* linux:218 (KEY_CONNECT) -> linux:218 (KEY_CONNECT) -> qnum:194 */
|
||||
[0xdb] = 0xc3, /* linux:219 (KEY_FINANCE) -> linux:219 (KEY_FINANCE) -> qnum:195 */
|
||||
[0xdc] = 0xc4, /* linux:220 (KEY_SPORT) -> linux:220 (KEY_SPORT) -> qnum:196 */
|
||||
[0xdd] = 0xc5, /* linux:221 (KEY_SHOP) -> linux:221 (KEY_SHOP) -> qnum:197 */
|
||||
[0xde] = 0x94, /* linux:222 (KEY_ALTERASE) -> linux:222 (KEY_ALTERASE) -> qnum:148 */
|
||||
[0xdf] = 0xca, /* linux:223 (KEY_CANCEL) -> linux:223 (KEY_CANCEL) -> qnum:202 */
|
||||
[0xe0] = 0xcc, /* linux:224 (KEY_BRIGHTNESSDOWN) -> linux:224 (KEY_BRIGHTNESSDOWN) -> qnum:204 */
|
||||
[0xe1] = 0xd4, /* linux:225 (KEY_BRIGHTNESSUP) -> linux:225 (KEY_BRIGHTNESSUP) -> qnum:212 */
|
||||
[0xe2] = 0xed, /* linux:226 (KEY_MEDIA) -> linux:226 (KEY_MEDIA) -> qnum:237 */
|
||||
[0xe3] = 0xd6, /* linux:227 (KEY_SWITCHVIDEOMODE) -> linux:227 (KEY_SWITCHVIDEOMODE) -> qnum:214 */
|
||||
[0xe4] = 0xd7, /* linux:228 (KEY_KBDILLUMTOGGLE) -> linux:228 (KEY_KBDILLUMTOGGLE) -> qnum:215 */
|
||||
[0xe5] = 0xd8, /* linux:229 (KEY_KBDILLUMDOWN) -> linux:229 (KEY_KBDILLUMDOWN) -> qnum:216 */
|
||||
[0xe6] = 0xd9, /* linux:230 (KEY_KBDILLUMUP) -> linux:230 (KEY_KBDILLUMUP) -> qnum:217 */
|
||||
[0xe7] = 0xda, /* linux:231 (KEY_SEND) -> linux:231 (KEY_SEND) -> qnum:218 */
|
||||
[0xe8] = 0xe4, /* linux:232 (KEY_REPLY) -> linux:232 (KEY_REPLY) -> qnum:228 */
|
||||
[0xe9] = 0x8e, /* linux:233 (KEY_FORWARDMAIL) -> linux:233 (KEY_FORWARDMAIL) -> qnum:142 */
|
||||
[0xea] = 0xd5, /* linux:234 (KEY_SAVE) -> linux:234 (KEY_SAVE) -> qnum:213 */
|
||||
[0xeb] = 0xf0, /* linux:235 (KEY_DOCUMENTS) -> linux:235 (KEY_DOCUMENTS) -> qnum:240 */
|
||||
[0xec] = 0xf1, /* linux:236 (KEY_BATTERY) -> linux:236 (KEY_BATTERY) -> qnum:241 */
|
||||
[0xed] = 0xf2, /* linux:237 (KEY_BLUETOOTH) -> linux:237 (KEY_BLUETOOTH) -> qnum:242 */
|
||||
[0xee] = 0xf3, /* linux:238 (KEY_WLAN) -> linux:238 (KEY_WLAN) -> qnum:243 */
|
||||
[0xef] = 0xf4, /* linux:239 (KEY_UWB) -> linux:239 (KEY_UWB) -> qnum:244 */
|
||||
};
|
||||
const unsigned int code_map_linux_to_qnum_len = sizeof(code_map_linux_to_qnum)/sizeof(code_map_linux_to_qnum[0]);
|
|
@ -411,7 +411,7 @@ void on_keyboard_event(struct keyboard_collection* collection,
|
|||
char name[256];
|
||||
xkb_keysym_get_name(symbol, name, sizeof(name));
|
||||
|
||||
vnc_client_send_keyboard_event(client, symbol, is_pressed);
|
||||
vnc_client_send_keyboard_event(client, symbol, key - 8, is_pressed);
|
||||
}
|
||||
|
||||
int on_vnc_client_alloc_fb(struct vnc_client* client)
|
||||
|
|
14
src/vnc.c
14
src/vnc.c
|
@ -25,6 +25,9 @@
|
|||
|
||||
#include "vnc.h"
|
||||
|
||||
extern const unsigned short code_map_linux_to_qnum[];
|
||||
extern const unsigned int code_map_linux_to_qnum_len;
|
||||
|
||||
static rfbBool vnc_client_alloc_fb(rfbClient* client)
|
||||
{
|
||||
struct vnc_client* self = rfbClientGetClientData(client, NULL);
|
||||
|
@ -210,9 +213,16 @@ void vnc_client_send_pointer_event(struct vnc_client* self, int x, int y,
|
|||
}
|
||||
|
||||
void vnc_client_send_keyboard_event(struct vnc_client* self, uint32_t symbol,
|
||||
bool is_pressed)
|
||||
uint32_t code, bool is_pressed)
|
||||
{
|
||||
SendKeyEvent(self->client, symbol, is_pressed);
|
||||
if (code >= code_map_linux_to_qnum_len)
|
||||
return;
|
||||
|
||||
uint32_t qnum = code_map_linux_to_qnum[code];
|
||||
if (!qnum)
|
||||
qnum = code;
|
||||
|
||||
SendExtendedKeyEvent(self->client, symbol, qnum, is_pressed);
|
||||
}
|
||||
|
||||
void vnc_client_set_encodings(struct vnc_client* self, const char* encodings)
|
||||
|
|
Loading…
Reference in New Issue