4f24b709d05b0e203e363694e3cb0cc9ccb510d5
[libguac-client-rdp.git] / src / rdp_keymap_base.c
1
2 /* ***** BEGIN LICENSE BLOCK *****
3  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4  *
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/
9  *
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
13  * License.
14  *
15  * The Original Code is libguac-client-rdp.
16  *
17  * The Initial Developer of the Original Code is
18  * Michael Jumper.
19  * Portions created by the Initial Developer are Copyright (C) 2011
20  * the Initial Developer. All Rights Reserved.
21  *
22  * Contributor(s):
23  * Matt Hortman
24  *
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.
36  *
37  * ***** END LICENSE BLOCK ***** */
38
39 #include <freerdp/input.h>
40
41 #include "rdp_keymap.h"
42
43 static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
44
45     /* BackSpace */
46     { .keysym = 0xff08, .scancode = 0x0E },
47
48     /* Tab */
49     { .keysym = 0xff09, .scancode = 0x0F },
50
51     /* Return */
52     { .keysym = 0xff0d, .scancode = 0x1C },
53
54     /* Left */
55     { .keysym = 0xff51, .scancode = 0x4B,
56         .flags = KBD_FLAGS_EXTENDED },
57
58     /* Up */
59     { .keysym = 0xff52, .scancode = 0x48,
60         .flags = KBD_FLAGS_EXTENDED },
61
62     /* Right */
63     { .keysym = 0xff53, .scancode = 0x4D,
64         .flags = KBD_FLAGS_EXTENDED },
65
66     /* Down */
67     { .keysym = 0xff54, .scancode = 0x50,
68         .flags = KBD_FLAGS_EXTENDED },
69
70     /* Menu */
71     { .keysym = 0xff67, .scancode = 0x5D,
72         .flags = KBD_FLAGS_EXTENDED },
73
74     /* KP_0 */
75     { .keysym = 0xffb0, .scancode = 0x52 },
76
77     /* KP_1 */
78     { .keysym = 0xffb1, .scancode = 0x4F },
79
80     /* KP_2 */
81     { .keysym = 0xffb2, .scancode = 0x50 },
82
83     /* KP_3 */
84     { .keysym = 0xffb3, .scancode = 0x51 },
85
86     /* KP_4 */
87     { .keysym = 0xffb4, .scancode = 0x4B },
88
89     /* KP_5 */
90     { .keysym = 0xffb5, .scancode = 0x4C },
91
92     /* KP_6 */
93     { .keysym = 0xffb6, .scancode = 0x4D },
94
95     /* KP_7 */
96     { .keysym = 0xffb7, .scancode = 0x47 },
97
98     /* KP_8 */
99     { .keysym = 0xffb8, .scancode = 0x48 },
100
101     /* KP_9 */
102     { .keysym = 0xffb9, .scancode = 0x49 },
103
104     /* Shift_L */
105     { .keysym = 0xffe1, .scancode = 0x2A },
106
107     /* Shift_R */
108     { .keysym = 0xffe2, .scancode = 0x36 },
109
110     /* Control_L */
111     { .keysym = 0xffe3, .scancode = 0x1D },
112
113     /* Control_R */
114     { .keysym = 0xffe4, .scancode = 0x1D },
115
116     /* Alt_L */
117     { .keysym = 0xffe9, .scancode = 0x38 },
118
119     /* Alt_R */
120     { .keysym = 0xffea, .scancode = 0x38 },
121
122     /* Super_L */
123     { .keysym = 0xffeb, .scancode = 0x5B,
124         .flags = KBD_FLAGS_EXTENDED },
125
126     /* Super_R */
127     { .keysym = 0xffec, .scancode = 0x5C,
128         .flags = KBD_FLAGS_EXTENDED },
129
130     /* Delete */
131     { .keysym = 0xffff, .scancode = 0x53,
132         .flags = KBD_FLAGS_EXTENDED },
133
134     {0}
135
136 };
137
138 const guac_rdp_keymap guac_rdp_keymap_base = {
139
140     .name = "base",
141
142     .parent = NULL,
143     .mapping = __guac_rdp_keymap_mapping
144
145 };
146