2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is libguac-client-rdp.
17 * The Initial Developer of the Original Code is
19 * Portions created by the Initial Developer are Copyright (C) 2011
20 * the Initial Developer. All Rights Reserved.
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #include <freerdp/input.h>
41 #include "rdp_keymap.h"
43 static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
46 { .keysym = 0xff08, .scancode = 0x0E },
49 { .keysym = 0xff09, .scancode = 0x0F },
52 { .keysym = 0xff0d, .scancode = 0x1C },
55 { .keysym = 0xff14, .scancode = 0x46 },
58 { .keysym = 0xff1b, .scancode = 0x01 },
61 { .keysym = 0xff50, .scancode = 0x47,
62 .flags = KBD_FLAGS_EXTENDED },
65 { .keysym = 0xff51, .scancode = 0x4B,
66 .flags = KBD_FLAGS_EXTENDED },
69 { .keysym = 0xff52, .scancode = 0x48,
70 .flags = KBD_FLAGS_EXTENDED },
73 { .keysym = 0xff53, .scancode = 0x4D,
74 .flags = KBD_FLAGS_EXTENDED },
77 { .keysym = 0xff54, .scancode = 0x50,
78 .flags = KBD_FLAGS_EXTENDED },
81 { .keysym = 0xff55, .scancode = 0x49,
82 .flags = KBD_FLAGS_EXTENDED },
85 { .keysym = 0xff67, .scancode = 0x5D,
86 .flags = KBD_FLAGS_EXTENDED },
89 { .keysym = 0xff56, .scancode = 0x51,
90 .flags = KBD_FLAGS_EXTENDED },
93 { .keysym = 0xff57, .scancode = 0x4F,
94 .flags = KBD_FLAGS_EXTENDED },
97 { .keysym = 0xff63, .scancode = 0x52,
98 .flags = KBD_FLAGS_EXTENDED },
101 { .keysym = 0xff7f, .scancode = 0x45 },
104 { .keysym = 0xffb0, .scancode = 0x52 },
107 { .keysym = 0xffb1, .scancode = 0x4F },
110 { .keysym = 0xffb2, .scancode = 0x50 },
113 { .keysym = 0xffb3, .scancode = 0x51 },
116 { .keysym = 0xffb4, .scancode = 0x4B },
119 { .keysym = 0xffb5, .scancode = 0x4C },
122 { .keysym = 0xffb6, .scancode = 0x4D },
125 { .keysym = 0xffb7, .scancode = 0x47 },
128 { .keysym = 0xffb8, .scancode = 0x48 },
131 { .keysym = 0xffb9, .scancode = 0x49 },
134 { .keysym = 0xffbe, .scancode = 0x3B },
137 { .keysym = 0xffbf, .scancode = 0x3C },
140 { .keysym = 0xffc0, .scancode = 0x3D },
143 { .keysym = 0xffc1, .scancode = 0x3E },
146 { .keysym = 0xffc2, .scancode = 0x3F },
149 { .keysym = 0xffc3, .scancode = 0x40 },
152 { .keysym = 0xffc4, .scancode = 0x41 },
155 { .keysym = 0xffc5, .scancode = 0x42 },
158 { .keysym = 0xffc6, .scancode = 0x43 },
161 { .keysym = 0xffc7, .scancode = 0x44 },
164 { .keysym = 0xffc8, .scancode = 0x57 },
167 { .keysym = 0xffc9, .scancode = 0x58 },
170 { .keysym = 0xffe1, .scancode = 0x2A },
173 { .keysym = 0xffe2, .scancode = 0x36 },
176 { .keysym = 0xffe3, .scancode = 0x1D },
179 { .keysym = 0xffe4, .scancode = 0x1D },
182 { .keysym = 0xffe5, .scancode = 0x3A,
183 .flags = KBD_FLAGS_EXTENDED },
186 { .keysym = 0xffe9, .scancode = 0x38 },
189 { .keysym = 0xffea, .scancode = 0x38 },
192 { .keysym = 0xffeb, .scancode = 0x5B,
193 .flags = KBD_FLAGS_EXTENDED },
196 { .keysym = 0xffec, .scancode = 0x5C,
197 .flags = KBD_FLAGS_EXTENDED },
200 { .keysym = 0xffff, .scancode = 0x53,
201 .flags = KBD_FLAGS_EXTENDED },
207 const guac_rdp_keymap guac_rdp_keymap_base = {
212 .mapping = __guac_rdp_keymap_mapping