2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @brief This is the header file for the key enumeration.
21 * This header file contains the declarations of the key enumeration.
23 #ifndef _FUI_KEY_TYPES_H_
24 #define _FUI_KEY_TYPES_H_
26 namespace Tizen { namespace Ui
32 * Defines the list of keys supported by the system. @n
33 * Note that certain keys may not be available on all devices. @n
34 * Please use the Tizen::Ui::KeyboardMap class to query the availability of a specific key on a target device.
40 KEY_INVALID = 0x0000, /**< The invalid key */
41 KEY_SIDE_UP, /**< The up side key */
42 KEY_SIDE_DOWN, /**< The down side key */
43 KEY_OK, /**< The OK key */
44 KEY_CLEAR, /**< The clear key */
45 KEY_CAMERA, /**< The camera key */
46 KEY_SWITCH, /**< The task switcher key */
47 KEY_0, /**< The 0 key */
48 KEY_1, /**< The 1 key */
49 KEY_2, /**< The 2 key */
50 KEY_3, /**< The 3 key */
51 KEY_4, /**< The 4 key */
52 KEY_5, /**< The 5 key */
53 KEY_6, /**< The 6 key */
54 KEY_7, /**< The 7 key */
55 KEY_8, /**< The 8 key */
56 KEY_9, /**< The 9 key */
57 KEY_ASTERISK, /**< The asterisk key */
58 KEY_SHARP, /**< The sharp key */
59 KEY_LEFT, /**< The left directional key */
60 KEY_UP, /**< The up directional key */
61 KEY_DOWN, /**< The down directional key */
62 KEY_RIGHT, /**< The right directional key */
63 KEY_MAX, /**< The Placeholder */
64 KEY_A, /**< The A key */
65 KEY_B, /**< The B key */
66 KEY_C, /**< The C key */
67 KEY_D, /**< The D key */
68 KEY_E, /**< The E key */
69 KEY_F, /**< The F key */
70 KEY_G, /**< The G key */
71 KEY_H, /**< The H key */
72 KEY_I, /**< The I key */
73 KEY_J, /**< The J key */
74 KEY_K, /**< The K key */
75 KEY_L, /**< The L key */
76 KEY_M, /**< The M key */
77 KEY_N, /**< The N key */
78 KEY_O, /**< The O key */
79 KEY_P, /**< The P key */
80 KEY_Q, /**< The Q key */
81 KEY_R, /**< The R key */
82 KEY_S, /**< The S key */
83 KEY_T, /**< The T key */
84 KEY_U, /**< The U key */
85 KEY_V, /**< The V key */
86 KEY_W, /**< The W key */
87 KEY_X, /**< The X key */
88 KEY_Y, /**< The Y key */
89 KEY_Z, /**< The Z key */
90 KEY_BACKSPACE, /**< The backspace key */
91 KEY_COMMA, /**< The comma key */
92 KEY_ENTER, /**< The enter key */
93 KEY_CAPSLOCK, /**< The Caps Lock key */
94 KEY_QUESTION, /**< The Question key */
95 KEY_ALT, /**< The Alt key */
96 KEY_SYM, /**< The Language Symbolkey */
97 KEY_SETTING, /**< The Language Setting key */
98 KEY_SPACE, /**< The Space key */
99 KEY_DOT, /**< The Dot key */
100 KEY_FN, /**< The Function key */
101 KEY_CAMERA_HALF_SHUTTER, /**< The camera half shutter key */
102 KEY_CHAR_SYM_1, /**< The Character symbol 1 key */
103 KEY_CHAR_SYM_2, /**< The Character symbol 2 key */
104 KEY_CHAR_SYM_3, /**< The Character symbol 3 key */
105 KEY_CHAR_SYM_4, /**< The Character symbol 4 key */
106 KEY_CHAR_SYM_5, /**< The Character symbol 5 key */
107 KEY_CHAR_SYM_6, /**< The Character symbol 6 key */
108 KEY_CHAR_SYM_7, /**< The Character symbol 7 key */
109 KEY_CHAR_SYM_8, /**< The Character symbol 8 key */
110 KEY_CHAR_SYM_9, /**< The Character symbol 9 key */
111 KEY_CHAR_SYM_A, /**< The Character symbol A key */
112 KEY_CHAR_SYM_B, /**< The Character symbol B key */
113 KEY_CHAR_SYM_C, /**< The Character symbol C key */
114 KEY_CHAR_SYM_D, /**< The Character symbol D key */
115 KEY_CHAR_SYM_E, /**< The Character symbol E key */
116 KEY_CHAR_SYM_F, /**< The Character symbol F key */
117 KEY_FN_1, /**< The function 1 key */
118 KEY_FN_2, /**< The function 2 key */
119 KEY_FN_3, /**< The function 3 key */
120 KEY_FN_4, /**< The function 4 key */
121 KEY_FN_5, /**< The function 5 key */
122 KEY_POWER_HOLD, /**< The power key */
123 KEY_DELETE, /**< The delete key */
125 KEY_APOSTROPHE, /**< The apostrophe key */
126 KEY_BACKSLASH, /**< The backslash key */
127 KEY_CONTEXT_MENU, /**< The menu key */
128 KEY_EQUAL, /**< The equal key */
129 KEY_ESC, /**< The esc key */
130 KEY_FN_6, /**< The function 6 key */
131 KEY_FN_7, /**< The function 7 key */
132 KEY_FN_8, /**< The function 8 key */
133 KEY_FN_9, /**< The function 9 key */
134 KEY_FN_10, /**< The function 10 key */
135 KEY_FN_11, /**< The function 11 key */
136 KEY_FN_12, /**< The function 12 key */
137 KEY_GRAVE, /**< The grave key */
138 KEY_INSERT, /**< The insert key */
139 KEY_LANGUAGE_SWITCH, /**< The language switch key */
140 KEY_LEFT_ALT, /**< The left alt key */
141 KEY_LEFT_BRACKET, /**< The left bracket key */
142 KEY_LEFT_CTRL, /**< The left control key */
143 KEY_LEFT_SHIFT, /**< The left shift key */
144 KEY_LEFT_WIN, /**< The left window key */
145 KEY_MINUS, /**< The minus key */
146 KEY_MOVE_END, /**< The end key */
147 KEY_MOVE_HOME, /**< The home key */
148 KEY_NUM_LOCK, /**< The number lock key */
149 KEY_NUMPAD_0, /**< The Numpad 0 key */
150 KEY_NUMPAD_1, /**< The Numpad 1 key */
151 KEY_NUMPAD_2, /**< The Numpad 2 key */
152 KEY_NUMPAD_3, /**< The Numpad 3 key */
153 KEY_NUMPAD_4, /**< The Numpad 4 key */
154 KEY_NUMPAD_5, /**< The Numpad 5 key */
155 KEY_NUMPAD_6, /**< The Numpad 6 key */
156 KEY_NUMPAD_7, /**< The Numpad 7 key */
157 KEY_NUMPAD_8, /**< The Numpad 8 key */
158 KEY_NUMPAD_9, /**< The Numpad 9 key */
159 KEY_NUMPAD_ADD, /**< The Numpad add key */
160 KEY_NUMPAD_DIVIDE, /**< The Numpad divide key */
161 KEY_NUMPAD_DOT, /**< The Numpad dot key */
162 KEY_NUMPAD_ENTER, /**< The Numpad enter key */
163 KEY_NUMPAD_MULTIPLY, /**< The Numpad multiply key */
164 KEY_NUMPAD_SUBTRACT, /**< The Numpad subtract key */
165 KEY_PAGE_DOWN, /**< The page down key */
166 KEY_PAGE_UP, /**< The page up key */
167 KEY_PAUSE_BREAK, /**< The pause key */
168 KEY_PRINT, /**< The print key */
169 KEY_RIGHT_ALT, /**< The right alt key */
170 KEY_RIGHT_BRACKET, /**< The right bracket key */
171 KEY_RIGHT_CTRL, /**< The right control key */
172 KEY_RIGHT_SHIFT, /**< The right shift key */
173 KEY_RIGHT_WIN, /**< The right window key */
174 KEY_SCROLL_LOCK, /**< The scroll lock key */
175 KEY_SEMICOLON, /**< The semicolon key */
176 KEY_SLASH, /**< The slash key */
177 KEY_TAB, /**< The tab key */
178 KEY_OEM_1, /**< The OEM 1 key */
179 KEY_OEM_2, /**< The OEM 2 key */
180 KEY_OEM_3, /**< The OEM 3 key */
181 KEY_OEM_4, /**< The OEM 4 key */
182 KEY_OEM_5, /**< The OEM 5 key */
183 KEY_OEM_6, /**< The OEM 6 key */
184 KEY_OEM_7, /**< The OEM 7 key */
185 KEY_OEM_8, /**< The OEM 8 key */
186 KEY_OEM_9, /**< The OEM 9 key */
187 KEY_OEM_10, /**< The OEM 10 key */
188 KEY_OEM_11, /**< The OEM 11 key */
189 KEY_OEM_12, /**< The OEM 12 key */
190 KEY_OEM_13, /**< The OEM 13 key */
191 KEY_OEM_14, /**< The OEM 14 key */
192 KEY_OEM_15, /**< The OEM 15 key */
193 KEY_OEM_16, /**< The OEM 16 key */
194 KEY_OEM_17, /**< The OEM 17 key */
195 KEY_OEM_18, /**< The OEM 18 key */
196 KEY_OEM_19, /**< The OEM 19 key */
197 KEY_OEM_20, /**< The OEM 20 key */
198 KEY_HARDWARE_MAX /**< The placeholder key */
204 * Defines the state of a key.
210 KEY_PRESSED = 0x0001, /**< The key is pressed */
211 KEY_RELEASED = 0x0002, /**< The key is released */
212 KEY_LONGPRESSED = 0x0003 /**< The key pressed and held down over a predefined duration */
218 * Defines constants used to identify key modifiers.
224 KEY_MODIFIER_NONE = 0, /**< No active modifiers */
225 KEY_MODIFIER_SHIFT = 1 << 0, /**< "Shift" is being pressed */
226 KEY_MODIFIER_CTRL = 1 << 1, /**< "Control" is being pressed */
227 KEY_MODIFIER_ALT = 1 << 2, /**< "Alt" is being pressed */
228 KEY_MODIFIER_WIN = 1 << 3, /**< "Win" (between "Ctrl" and "Alt") is being pressed */
229 KEY_MODIFIER_SCROLL_LOCK = 1 << 4, /**< "Scroll" is locked */
230 KEY_MODIFIER_NUM_LOCK = 1 << 5, /**< "Num Lock" on the keyboard is locked */
231 KEY_MODIFIER_CAPS_LOCK = 1 << 6, /**< "Caps" is locked */
236 #endif // _FUI_KEY_TYPES_H_