2 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS"
14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE.
32 // Control-break processing
33 // Middle mouse button (three-button mouse)
47 #define VK_RETURN 0x0D
53 #define VK_CONTROL 0x11 // CTRL key
56 #define VK_MENU 0x12 // ALT key
59 #define VK_PAUSE 0x13 // PAUSE key
62 #define VK_CAPITAL 0x14 // CAPS LOCK key
65 #define VK_KANA 0x15 // Input Method Editor (IME) Kana mode
68 #define VK_HANGUL 0x15 // IME Hangul mode
71 #define VK_JUNJA 0x17 // IME Junja mode
74 #define VK_FINAL 0x18 // IME final mode
77 #define VK_HANJA 0x19 // IME Hanja mode
80 #define VK_KANJI 0x19 // IME Kanji mode
83 #define VK_ESCAPE 0x1B // ESC key
86 #define VK_CONVERT 0x1C // IME convert
89 #define VK_NONCONVERT 0x1D // IME nonconvert
92 #define VK_ACCEPT 0x1E // IME accept
95 #define VK_MODECHANGE 0x1F // IME mode change request
98 #define VK_SPACE 0x20 // SPACE key
101 #define VK_PRIOR 0x21 // PAGE UP key
104 #define VK_NEXT 0x22 // PAGE DOWN key
107 #define VK_END 0x23 // END key
110 #define VK_HOME 0x24 // HOME key
113 #define VK_LEFT 0x25 // LEFT ARROW key
116 #define VK_UP 0x26 // UP ARROW key
119 #define VK_RIGHT 0x27 // RIGHT ARROW key
122 #define VK_DOWN 0x28 // DOWN ARROW key
125 #define VK_SELECT 0x29 // SELECT key
128 #define VK_PRINT 0x2A // PRINT key
131 #define VK_EXECUTE 0x2B // EXECUTE key
134 #define VK_SNAPSHOT 0x2C // PRINT SCREEN key
137 #define VK_INSERT 0x2D // INS key
140 #define VK_DELETE 0x2E // DEL key
143 #define VK_HELP 0x2F // HELP key
183 #define VK_LWIN 0x5B // Left Windows key (Microsoft Natural keyboard)
185 #define VK_RWIN 0x5C // Right Windows key (Natural keyboard)
187 #define VK_APPS 0x5D // Applications key (Natural keyboard)
189 #define VK_SLEEP 0x5F // Computer Sleep key
192 #define VK_NUMPAD0 0x60
193 #define VK_NUMPAD1 0x61
194 #define VK_NUMPAD2 0x62
195 #define VK_NUMPAD3 0x63
196 #define VK_NUMPAD4 0x64
197 #define VK_NUMPAD5 0x65
198 #define VK_NUMPAD6 0x66
199 #define VK_NUMPAD7 0x67
200 #define VK_NUMPAD8 0x68
201 #define VK_NUMPAD9 0x69
202 #define VK_MULTIPLY 0x6A
204 #define VK_SEPARATOR 0x6C
205 #define VK_SUBTRACT 0x6D
206 #define VK_DECIMAL 0x6E
207 #define VK_DIVIDE 0x6F
234 #define VK_NUMLOCK 0x90
235 #define VK_SCROLL 0x91
236 #define VK_LSHIFT 0xA0
237 #define VK_RSHIFT 0xA1
238 #define VK_LCONTROL 0xA2
239 #define VK_RCONTROL 0xA3
240 #define VK_LMENU 0xA4
241 #define VK_RMENU 0xA5
243 #define VK_BROWSER_BACK 0xA6 // Windows 2000/XP: Browser Back key
244 #define VK_BROWSER_FORWARD 0xA7 // Windows 2000/XP: Browser Forward key
245 #define VK_BROWSER_REFRESH 0xA8 // Windows 2000/XP: Browser Refresh key
246 #define VK_BROWSER_STOP 0xA9 // Windows 2000/XP: Browser Stop key
247 #define VK_BROWSER_SEARCH 0xAA // Windows 2000/XP: Browser Search key
248 #define VK_BROWSER_FAVORITES 0xAB // Windows 2000/XP: Browser Favorites key
249 #define VK_BROWSER_HOME 0xAC // Windows 2000/XP: Browser Start and Home key
250 #define VK_VOLUME_MUTE 0xAD // Windows 2000/XP: Volume Mute key
251 #define VK_VOLUME_DOWN 0xAE // Windows 2000/XP: Volume Down key
252 #define VK_VOLUME_UP 0xAF // Windows 2000/XP: Volume Up key
253 #define VK_MEDIA_NEXT_TRACK 0xB0 // Windows 2000/XP: Next Track key
254 #define VK_MEDIA_PREV_TRACK 0xB1 // Windows 2000/XP: Previous Track key
255 #define VK_MEDIA_STOP 0xB2 // Windows 2000/XP: Stop Media key
256 #define VK_MEDIA_PLAY_PAUSE 0xB3 // Windows 2000/XP: Play/Pause Media key
257 #define VK_MEDIA_LAUNCH_MAIL 0xB4 // Windows 2000/XP: Start Mail key
258 #define VK_MEDIA_LAUNCH_MEDIA_SELECT 0xB5 // Windows 2000/XP: Select Media key
259 #define VK_MEDIA_LAUNCH_APP1 \
260 0xB6 // VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
261 #define VK_MEDIA_LAUNCH_APP2 \
262 0xB7 // VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
264 // VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard.
265 // Windows 2000/XP: For the US standard keyboard, the ';:' key
266 #define VK_OEM_1 0xBA
268 // Windows 2000/XP: For any country/region, the '+' key
269 #define VK_OEM_PLUS 0xBB
271 // Windows 2000/XP: For any country/region, the ',' key
272 #define VK_OEM_COMMA 0xBC
274 // Windows 2000/XP: For any country/region, the '-' key
275 #define VK_OEM_MINUS 0xBD
277 // Windows 2000/XP: For any country/region, the '.' key
278 #define VK_OEM_PERIOD 0xBE
280 // VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard.
281 // Windows 2000/XP: For the US standard keyboard, the '/?' key
282 #define VK_OEM_2 0xBF
284 // VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard.
285 // Windows 2000/XP: For the US standard keyboard, the '`~' key
286 #define VK_OEM_3 0xC0
288 // VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard.
289 // Windows 2000/XP: For the US standard keyboard, the '[{' key
290 #define VK_OEM_4 0xDB
292 // VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard.
293 // Windows 2000/XP: For the US standard keyboard, the '\|' key
294 #define VK_OEM_5 0xDC
296 // VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard.
297 // Windows 2000/XP: For the US standard keyboard, the ']}' key
298 #define VK_OEM_6 0xDD
300 // VK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard.
301 // Windows 2000/XP: For the US standard keyboard, the
302 // 'single-quote/double-quote' key
303 #define VK_OEM_7 0xDE
305 // VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
306 #define VK_OEM_8 0xDF
308 // VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the
309 // backslash key on the RT 102-key keyboard
310 #define VK_OEM_102 0xE2
312 // Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
313 #define VK_PROCESSKEY 0xE5
315 // Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes.
316 // The VK_PACKET key is the low word of a 32-bit Virtual Key value used for
317 // non-keyboard input methods. For more information, see Remark in
318 // KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP
319 #define VK_PACKET 0xE7
321 #define VK_ATTN 0xF6 // Attn key
322 #define VK_CRSEL 0xF7 // CrSel key
323 #define VK_EXSEL 0xF8 // ExSel key
324 #define VK_EREOF 0xF9 // Erase EOF key
325 #define VK_PLAY 0xFA // Play key
326 #define VK_ZOOM 0xFB // Zoom key
328 #define VK_NONAME 0xFC // Reserved for future use
330 #define VK_PA1 0xFD // VK_PA1 (FD) PA1 key
332 #define VK_OEM_CLEAR 0xFE // Clear key
334 #if defined(OS_TIZEN_TV_PRODUCT)
335 // TV keys on remote controller.
336 // Virtual keys defined in http://www.atsc.org/cms/standards/a100/a_100_2.pdf
337 // Same volume virtual keys are already defined in Windows virtual keys but we overlap with the keys defined in DTV.
340 #undef VK_VOLUME_DOWN
341 #undef VK_VOLUME_MUTE
346 #define VK_GREEN 0x194
347 #define VK_YELLOW 0x195
348 #define VK_BLUE 0x196
349 #define VK_GREY 0x197
350 #define VK_BROWN 0x198
351 #define VK_DTV_RETURN 0x2719
352 #define VK_DTV_HOME 0x2757
353 #define VK_SOURCE 0x2758
354 #define VK_CH_LIST 0x2759
355 #define VK_POWER 0x199
356 #define VK_DTV_MENU 0x2795
357 #define VK_GUIDE 0x1CA
358 #define VK_ADDDEL 0x1AD
359 #define VK_AUTO_PROGRAM 0x1B9
360 #define VK_FAVCH 0x1B1
361 #define VK_BT_DUALVIEW 0x1BB
362 #define VK_SUB_TITLE 0x1CC
363 #define VK_REWIND 0x19C
364 #define VK_STOP 0x19D
365 #define VK_PLAY 0x19F
366 #define VK_RECORD 0x1A0
367 #define VK_FAST_FWD 0x1A1
368 #define VK_CHANNEL_UP 0x1AB
369 #define VK_CHANNEL_DOWN 0x1AC
370 #define VK_VOLUME_UP 0x1BF
371 #define VK_VOLUME_DOWN 0x1C0
372 #define VK_VOLUME_MUTE 0x1C1
373 #define VK_INFO 0x1C9
374 #define VK_REPEAT 0x2799
375 #define VK_ASPECT 0x279C
376 #define VK_PMODE 0x279D
377 #define VK_HDMI 0x279F
378 #define VK_USBHUB_SWITCH 0x27A0
379 #define VK_EMANUAL 0x27A2
380 #define VK_TOOLS 0x2797
381 #define VK_MORE 0x27A4
382 #define VK_FACTORY 0x27A5
383 #define VK_SLEEP 0x27A6
385 #define VK_DTV 0x27AA
386 #define VK_STB_POWER 0x27AB
387 #define VK_PANEL_DOWN 0x27AD
388 #define VK_CONVERGENCE 0x27AE
389 #define VK_BT_COLOR_MECHA 0x27AF
390 #define VK_STILL_PICTURE 0x27B0
391 #define VK_BT_TRIGGER 0x27B1
392 #define VK_BT_HOTVK 0x27B2
393 #define VK_BT_DEVICE 0x27B3
394 #define VK_BT_CONTENTSBAR 0x27B4
395 #define VK_GAME 0x27B5
396 #define VK_PIP_CHUP 0x27B7
397 #define VK_PIP_CHDOWN 0x27B8
398 #define VK_ANTENA 0x27B9
399 #define VK_PANEL_ENTER 0x27BB
400 #define VK_LINK 0x27BC
401 #define VK_PANEL_UP 0x27BD
403 #define VK_ANGLE 0x27C1
404 #define VK_WHEEL_LEFT 0x27C2
405 #define VK_WHEEL_RIGHT 0x27C3
406 #define VK_CONTENTS 0x2757
407 #define VK_PANEL_EXIT 0x27C5
408 #define VK_EXIT 0x27C6
410 #define VK_MBR_TV 0x27C7
411 #define VK_MBR_STB_GUIDE 0x27C8
412 #define VK_MBR_BD_POPUP 0x27C9
413 #define VK_MBR_BDDVD_POWER 0x27CA
414 #define VK_MBR_SETUP_FAILURE 0x27CB
415 #define VK_MBR_SETUP 0x27CC
416 #define VK_MBR_WATCH_TV 0x27CD
418 #define VK_PRECH 0x27CE
419 #define VK_RECOMMEND_SEARCH_TOGGLE 0x27D0
420 #define VK_BT_NUMBER 0x27D1
421 #define VK_16_9 0x27D2
422 #define VK_MTS 0x27D3
423 #define VK_SMODE 0x27D5
424 #define VK_3SPEED 0x27D6
426 #define VK_TTX_MIX 0x27D8
427 #define VK_SRSTSXT 0x27D9
428 #define VK_WIFI_PAIRING 0x27DA
429 #define VK_BT_SAMSUNG_APPS 0x27E3
430 #define VK_W_LINK 0x2757
431 #define VK_ESAVING 0x27E5
432 #define VK_CLEAR 0x27E6
433 #define VK_TV_SNS 0x27E9
434 #define VK_DVR 0x27EA
435 #define VK_APP_LIST 0x27EB
436 #define VK_CAMERA 0x27EC
437 #define VK_CAPTION 0x27ED
438 #define VK_ZOOM1 0x27EE
439 #define VK_PANEL_PLUS 0x27EF
440 #define VK_BT_VOICE 0x27F0
441 #define VK_SEARCH 0x27F1
442 #define VK_PANEL_MINUS 0x27F3
443 #define VK_SOCCER_MODE 0x27F4
444 #define VK_FUNCTIONS_AMAZON 0x27F5
446 #define VK_REWIND_ 0x27F8
447 #define VK_FF_ 0x27F9
448 #define VK_FUNCTIONS_NETFLIX 0x27FA
449 #define VK_PIP_ONOFF 0x27FB
450 #define VK_MBR_WATCH_MOVIE 0x27FC
451 #define VK_MBR_STBBD_MENU 0x27FD
452 #define VK_MBR_SETUP_CONFIRM 0x27FE
453 #define VK_FAMILYHUB 0x27FF
454 #define VK_ANYVIEW 0x2800
455 #define VK_PAGE_LEFT 0x2809
456 #define VK_PAGE_RIGHT 0x280A
458 #define VK_SOFT_WAKE_UP 0x2804
459 #define VK_PANEL_ON 0x280B
460 #define VK_PLAY_BACK 0x280C
461 #define VK_EXTRA 0x280D
462 #define VK_COLOR 0x2891
463 #define VK_IME_DONE 0xFF60 // keyname of IME Done button is Select. but Select(0xFF60) is only Tizen TV IME keyname defined by ISF, there is no X Server keycode. 0xFF60 is ISF keycode.
464 #define VK_IME_CANCEL 0xFF69 // keyname of IME Cancel button is Cancel. but Select(0xFF69) is only Tizen TV IME keyname defined by ISF, there is no X Server keycode. 0xFF69 is ISF keycode.
466 #endif //#if defined(OS_TIZEN_TV_PRODUCT)