xref: /AOO41X/main/vcl/inc/vcl/keycodes.hxx (revision 0d63794c5b3715d9f8da2f4b7b451b7426ee7897)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SV_KEYCODES_HXX
25 #define _SV_KEYCODES_HXX
26 
27 #include <vcl/sv.h>
28 #include <com/sun/star/awt/Key.hpp>
29 #include <com/sun/star/awt/KeyGroup.hpp>
30 
31 // -----------------
32 // - KeyCode-Types -
33 // -----------------
34 
35 // By changes you must also change: rsc/vclrsc.hxx
36 
37 // Key-Gruppen
38 #define KEYGROUP_NUM    ((sal_uInt16)::com::sun::star::awt::KeyGroup::NUM)
39 #define KEYGROUP_ALPHA  ((sal_uInt16)::com::sun::star::awt::KeyGroup::ALPHA)
40 #define KEYGROUP_FKEYS  ((sal_uInt16)::com::sun::star::awt::KeyGroup::FKEYS)
41 #define KEYGROUP_CURSOR ((sal_uInt16)::com::sun::star::awt::KeyGroup::CURSOR)
42 #define KEYGROUP_MISC   ((sal_uInt16)::com::sun::star::awt::KeyGroup::MISC)
43 #define KEYGROUP_TYPE   ((sal_uInt16)::com::sun::star::awt::KeyGroup::TYPE)
44 
45 // Key-Codes
46 #define KEY_0           ((sal_uInt16)::com::sun::star::awt::Key::NUM0)
47 #define KEY_1           ((sal_uInt16)::com::sun::star::awt::Key::NUM1)
48 #define KEY_2           ((sal_uInt16)::com::sun::star::awt::Key::NUM2)
49 #define KEY_3           ((sal_uInt16)::com::sun::star::awt::Key::NUM3)
50 #define KEY_4           ((sal_uInt16)::com::sun::star::awt::Key::NUM4)
51 #define KEY_5           ((sal_uInt16)::com::sun::star::awt::Key::NUM5)
52 #define KEY_6           ((sal_uInt16)::com::sun::star::awt::Key::NUM6)
53 #define KEY_7           ((sal_uInt16)::com::sun::star::awt::Key::NUM7)
54 #define KEY_8           ((sal_uInt16)::com::sun::star::awt::Key::NUM8)
55 #define KEY_9           ((sal_uInt16)::com::sun::star::awt::Key::NUM9)
56 
57 #define KEY_A           ((sal_uInt16)::com::sun::star::awt::Key::A)
58 #define KEY_B           ((sal_uInt16)::com::sun::star::awt::Key::B)
59 #define KEY_C           ((sal_uInt16)::com::sun::star::awt::Key::C)
60 #define KEY_D           ((sal_uInt16)::com::sun::star::awt::Key::D)
61 #define KEY_E           ((sal_uInt16)::com::sun::star::awt::Key::E)
62 #define KEY_F           ((sal_uInt16)::com::sun::star::awt::Key::F)
63 #define KEY_G           ((sal_uInt16)::com::sun::star::awt::Key::G)
64 #define KEY_H           ((sal_uInt16)::com::sun::star::awt::Key::H)
65 #define KEY_I           ((sal_uInt16)::com::sun::star::awt::Key::I)
66 #define KEY_J           ((sal_uInt16)::com::sun::star::awt::Key::J)
67 #define KEY_K           ((sal_uInt16)::com::sun::star::awt::Key::K)
68 #define KEY_L           ((sal_uInt16)::com::sun::star::awt::Key::L)
69 #define KEY_M           ((sal_uInt16)::com::sun::star::awt::Key::M)
70 #define KEY_N           ((sal_uInt16)::com::sun::star::awt::Key::N)
71 #define KEY_O           ((sal_uInt16)::com::sun::star::awt::Key::O)
72 #define KEY_P           ((sal_uInt16)::com::sun::star::awt::Key::P)
73 #define KEY_Q           ((sal_uInt16)::com::sun::star::awt::Key::Q)
74 #define KEY_R           ((sal_uInt16)::com::sun::star::awt::Key::R)
75 #define KEY_S           ((sal_uInt16)::com::sun::star::awt::Key::S)
76 #define KEY_T           ((sal_uInt16)::com::sun::star::awt::Key::T)
77 #define KEY_U           ((sal_uInt16)::com::sun::star::awt::Key::U)
78 #define KEY_V           ((sal_uInt16)::com::sun::star::awt::Key::V)
79 #define KEY_W           ((sal_uInt16)::com::sun::star::awt::Key::W)
80 #define KEY_X           ((sal_uInt16)::com::sun::star::awt::Key::X)
81 #define KEY_Y           ((sal_uInt16)::com::sun::star::awt::Key::Y)
82 #define KEY_Z           ((sal_uInt16)::com::sun::star::awt::Key::Z)
83 
84 #define KEY_F1          ((sal_uInt16)::com::sun::star::awt::Key::F1)
85 #define KEY_F2          ((sal_uInt16)::com::sun::star::awt::Key::F2)
86 #define KEY_F3          ((sal_uInt16)::com::sun::star::awt::Key::F3)
87 #define KEY_F4          ((sal_uInt16)::com::sun::star::awt::Key::F4)
88 #define KEY_F5          ((sal_uInt16)::com::sun::star::awt::Key::F5)
89 #define KEY_F6          ((sal_uInt16)::com::sun::star::awt::Key::F6)
90 #define KEY_F7          ((sal_uInt16)::com::sun::star::awt::Key::F7)
91 #define KEY_F8          ((sal_uInt16)::com::sun::star::awt::Key::F8)
92 #define KEY_F9          ((sal_uInt16)::com::sun::star::awt::Key::F9)
93 #define KEY_F10         ((sal_uInt16)::com::sun::star::awt::Key::F10)
94 #define KEY_F11         ((sal_uInt16)::com::sun::star::awt::Key::F11)
95 #define KEY_F12         ((sal_uInt16)::com::sun::star::awt::Key::F12)
96 #define KEY_F13         ((sal_uInt16)::com::sun::star::awt::Key::F13)
97 #define KEY_F14         ((sal_uInt16)::com::sun::star::awt::Key::F14)
98 #define KEY_F15         ((sal_uInt16)::com::sun::star::awt::Key::F15)
99 #define KEY_F16         ((sal_uInt16)::com::sun::star::awt::Key::F16)
100 #define KEY_F17         ((sal_uInt16)::com::sun::star::awt::Key::F17)
101 #define KEY_F18         ((sal_uInt16)::com::sun::star::awt::Key::F18)
102 #define KEY_F19         ((sal_uInt16)::com::sun::star::awt::Key::F19)
103 #define KEY_F20         ((sal_uInt16)::com::sun::star::awt::Key::F20)
104 #define KEY_F21         ((sal_uInt16)::com::sun::star::awt::Key::F21)
105 #define KEY_F22         ((sal_uInt16)::com::sun::star::awt::Key::F22)
106 #define KEY_F23         ((sal_uInt16)::com::sun::star::awt::Key::F23)
107 #define KEY_F24         ((sal_uInt16)::com::sun::star::awt::Key::F24)
108 #define KEY_F25         ((sal_uInt16)::com::sun::star::awt::Key::F25)
109 #define KEY_F26         ((sal_uInt16)::com::sun::star::awt::Key::F26)
110 
111 #define KEY_DOWN        ((sal_uInt16)::com::sun::star::awt::Key::DOWN)
112 #define KEY_UP          ((sal_uInt16)::com::sun::star::awt::Key::UP)
113 #define KEY_LEFT        ((sal_uInt16)::com::sun::star::awt::Key::LEFT)
114 #define KEY_RIGHT       ((sal_uInt16)::com::sun::star::awt::Key::RIGHT)
115 #define KEY_HOME        ((sal_uInt16)::com::sun::star::awt::Key::HOME)
116 #define KEY_END         ((sal_uInt16)::com::sun::star::awt::Key::END)
117 #define KEY_PAGEUP      ((sal_uInt16)::com::sun::star::awt::Key::PAGEUP)
118 #define KEY_PAGEDOWN    ((sal_uInt16)::com::sun::star::awt::Key::PAGEDOWN)
119 
120 #define KEY_RETURN      ((sal_uInt16)::com::sun::star::awt::Key::RETURN)
121 #define KEY_ESCAPE      ((sal_uInt16)::com::sun::star::awt::Key::ESCAPE)
122 #define KEY_TAB         ((sal_uInt16)::com::sun::star::awt::Key::TAB)
123 #define KEY_BACKSPACE   ((sal_uInt16)::com::sun::star::awt::Key::BACKSPACE)
124 #define KEY_SPACE       ((sal_uInt16)::com::sun::star::awt::Key::SPACE)
125 #define KEY_INSERT      ((sal_uInt16)::com::sun::star::awt::Key::INSERT)
126 #define KEY_DELETE      ((sal_uInt16)::com::sun::star::awt::Key::DELETE)
127 
128 #define KEY_ADD         ((sal_uInt16)::com::sun::star::awt::Key::ADD)
129 #define KEY_SUBTRACT    ((sal_uInt16)::com::sun::star::awt::Key::SUBTRACT)
130 #define KEY_MULTIPLY    ((sal_uInt16)::com::sun::star::awt::Key::MULTIPLY)
131 #define KEY_DIVIDE      ((sal_uInt16)::com::sun::star::awt::Key::DIVIDE)
132 #define KEY_POINT       ((sal_uInt16)::com::sun::star::awt::Key::POINT)
133 #define KEY_COMMA       ((sal_uInt16)::com::sun::star::awt::Key::COMMA)
134 #define KEY_LESS        ((sal_uInt16)::com::sun::star::awt::Key::LESS)
135 #define KEY_GREATER     ((sal_uInt16)::com::sun::star::awt::Key::GREATER)
136 #define KEY_EQUAL       ((sal_uInt16)::com::sun::star::awt::Key::EQUAL)
137 
138 #define KEY_OPEN        ((sal_uInt16)::com::sun::star::awt::Key::OPEN)
139 #define KEY_CUT         ((sal_uInt16)::com::sun::star::awt::Key::CUT)
140 #define KEY_COPY        ((sal_uInt16)::com::sun::star::awt::Key::COPY)
141 #define KEY_PASTE       ((sal_uInt16)::com::sun::star::awt::Key::PASTE)
142 #define KEY_UNDO        ((sal_uInt16)::com::sun::star::awt::Key::UNDO)
143 #define KEY_REPEAT      ((sal_uInt16)::com::sun::star::awt::Key::REPEAT)
144 #define KEY_FIND        ((sal_uInt16)::com::sun::star::awt::Key::FIND)
145 #define KEY_PROPERTIES  ((sal_uInt16)::com::sun::star::awt::Key::PROPERTIES)
146 #define KEY_FRONT       ((sal_uInt16)::com::sun::star::awt::Key::FRONT)
147 #define KEY_CONTEXTMENU ((sal_uInt16)::com::sun::star::awt::Key::CONTEXTMENU)
148 #define KEY_MENU        ((sal_uInt16)::com::sun::star::awt::Key::MENU)
149 #define KEY_HELP        ((sal_uInt16)::com::sun::star::awt::Key::HELP)
150 #define KEY_HANGUL_HANJA ((sal_uInt16)::com::sun::star::awt::Key::HANGUL_HANJA)
151 #define KEY_DECIMAL     ((sal_uInt16)::com::sun::star::awt::Key::DECIMAL)
152 #define KEY_TILDE       ((sal_uInt16)::com::sun::star::awt::Key::TILDE)
153 #define KEY_QUOTELEFT   ((sal_uInt16)::com::sun::star::awt::Key::QUOTELEFT)
154 
155 #define KEY_CODE        ((sal_uInt16)0x0FFF)
156 
157 // Modifier-Tasten
158 #define KEY_SHIFT       ((sal_uInt16)0x1000)
159 #define KEY_MOD1        ((sal_uInt16)0x2000)
160 #define KEY_MOD2        ((sal_uInt16)0x4000)
161 #define KEY_MOD3    ((sal_uInt16)0x8000)
162 #define KEY_MODTYPE ((sal_uInt16)0xF000)
163 #define KEY_ALLMODTYPE  ((sal_uInt16)0xF000)
164 
165 // extended Modifier-Keys (only used for modkey events)
166 #define MODKEY_LSHIFT    0x0001
167 #define MODKEY_RSHIFT    0x0002
168 #define MODKEY_LMOD1     0x0004
169 #define MODKEY_RMOD1     0x0008
170 #define MODKEY_LMOD2     0x0010
171 #define MODKEY_RMOD2     0x0020
172 #define MODKEY_LMOD3     0x0040
173 #define MODKEY_RMOD3     0x0080
174 #define MODKEY_SHIFT     (MODKEY_LSHIFT|MODKEY_RSHIFT)
175 #define MODKEY_MOD1      (MODKEY_LMOD1|MODKEY_RMOD1)
176 #define MODKEY_MOD2      (MODKEY_LMOD2|MODKEY_RMOD2)
177 #define MODKEY_MOD3      (MODKEY_LMOD3|MODKEY_RMOD3)
178 
179 // ---------------
180 // - Mouse-Types -
181 // ---------------
182 
183 #define MOUSE_LEFT      ((sal_uInt16)0x0001)
184 #define MOUSE_MIDDLE    ((sal_uInt16)0x0002)
185 #define MOUSE_RIGHT     ((sal_uInt16)0x0004)
186 
187 #endif // _SV_KEYCODES_HXX
188