UNPKG

146 kBHTMLView Raw
1<!DOCTYPE html>
2
3<html lang="en">
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width">
7 <title>CrossBrowdy API documentation Source: CrossBase/input/CB_Keyboard.js</title>
8
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13
14 <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15
16</head>
17
18<body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
19
20<div class="navbar navbar-default navbar-fixed-top ">
21<div class="container">
22 <div class="navbar-header">
23 <a class="navbar-brand" href="index.html">CrossBrowdy API documentation</a>
24 <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25 <span class="icon-bar"></span>
26 <span class="icon-bar"></span>
27 <span class="icon-bar"></span>
28 </button>
29 </div>
30 <div class="navbar-collapse collapse" id="topNavigation">
31 <ul class="nav navbar-nav">
32
33 <li class="dropdown">
34 <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
35 <ul class="dropdown-menu inline">
36 <li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li>
37 </ul>
38 </li>
39
40 <li class="dropdown">
41 <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42 <ul class="dropdown-menu inline">
43 <li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
44 </ul>
45 </li>
46
47 <li class="dropdown">
48 <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49 <ul class="dropdown-menu inline">
50 <li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li>
51 </ul>
52 </li>
53
54 </ul>
55
56 <div class="col-sm-3 col-md-3">
57 <form class="navbar-form" role="search">
58 <div class="input-group">
59 <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60 <div class="input-group-btn">
61 <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62 </div>
63 </div>
64 </form>
65 </div>
66
67 </div>
68
69</div>
70</div>
71
72
73<div class="container" id="toc-content" style="width:100%;">
74<div class="row" style="width:100%;">
75
76
77 <div class="col-md-12">
78
79 <div id="main">
80
81
82 <h1 class="page-title">Source: CrossBase/input/CB_Keyboard.js</h1>
83
84<section>
85 <article>
86 <pre
87 class="sunlight-highlight-javascript linenums">/**
88 * @file Keyboard management (and other devices which also fire [keyboard events]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent} as TV remote controls, game consoles' gamepads, etc.). Contains the {@link CB_Keyboard} static class.
89 * @author Joan Alba Maldonado &lt;workindalian@gmail.com>
90 * @license Creative Commons Attribution 4.0 International. See more at {@link https://crossbrowdy.com/about#what_is_the_crossbrowdy_copyright_and_license}.
91 */
92
93/**
94 * Static class to manage the keyboard and other input devices that generate key codes. It will return itself if it is tried to be instantiated.
95 * @namespace
96 */
97var CB_Keyboard = function() { return CB_Keyboard; };
98{
99 //CB_Keyboard.onKeyPressFunction; //Function that is executed when a key is pressed (onKeyPress event).
100 //CB_Keyboard.onKeyDownFunction; //Function that is executed when a key is down (onKeyDown event).
101 //CB_Keyboard.onKeyUpFunction; //Function that is executed when a key is released (onKeyUp event).
102 //CB_Keyboard.firstEvent = ""; //Defines wheter the first event captured is onKeyDown or onKeyPress (compatibility reasons).
103 //CB_Keyboard.onKeyDownOrPressFunction; //Function that is executed when either a key is down os pressed (onKeyDown or onKeyPress event)
104
105 /**
106 * Object that will store the status for each key detected, using the key code as index and a boolean as their value (true when down or false when released).
107 * @var
108 * @readonly
109 * @type {Object}
110 * @default
111 */
112 CB_Keyboard.keysDown = {};
113
114
115 /**
116 * Array with the codes of the keys pressed recently (it will be cleared after the chosen milliseconds set with the {@link CB_Keyboard.setKeysPressedExpiration} function).
117 * @var
118 * @readonly
119 * @type {array}
120 * @default
121 */
122 CB_Keyboard.keysPressed = [];
123 CB_Keyboard._keysPressedExpiration = 500; //Milliseconds before keys pressed array expires.
124 CB_Keyboard._keysPressedExpirationTimeout = null; //It will store the timeout that clears the keys pressed array.
125
126
127 /**
128 * Array with the codes of the string typed recently (it will be cleared after the chosen milliseconds set with the {@link CB_Keyboard.setTypedStringExpiration} function).
129 * @var
130 * @readonly
131 * @type {array}
132 * @default
133 */
134 CB_Keyboard.typedStringCodes = [];
135
136
137 /**
138 * Stores the string typed recently (it will be cleared after the chosen milliseconds set with the {@link CB_Keyboard.setTypedStringExpiration} function).
139 * @var
140 * @readonly
141 * @type {string}
142 * @default
143 */
144 CB_Keyboard.typedString = ""; //Stores the string typed (it will be cleared after some milliseconds).
145 CB_Keyboard._typedStringExpiration = 500; //Milliseconds before typed string expires.
146 CB_Keyboard._typedStringExpirationTimeout = null; //It will store the timeout that clears the typed string.
147
148
149 CB_Keyboard.initialized = false; //It will tells whether the object has been initialized or not.
150
151
152 /**
153 Property that keeps extended key codes for different systems and platforms.
154 * @namespace CB_Keyboard.extended
155 */
156 CB_Keyboard.extended = {};
157
158 /**
159 * Smart TV Alliance and virtual keyboard key codes.
160 * @memberof CB_Keyboard.extended
161 * @name VK
162 * @constant
163 * @type {Object}
164 * @default
165 * @todo Consider adding more (found in {@link https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx} and {@link http://nehe.gamedev.net/article/msdn_virtualkey_codes/15009/})
166 * @property {number} ENTER - ENTER key.
167 * @property {number} PAUSE - PAUSE key.
168 * @property {number} PAGE_UP - PAGE UP key.
169 * @property {number} PAGE_DOWN - PAGE DOWN key.
170 * @property {number} LEFT - LEFT key.
171 * @property {number} UP - UP key.
172 * @property {number} RIGHT - RIGHT key.
173 * @property {number} DOWN - DOWN key.
174 * @property {number} _0 - 0 (zero) key.
175 * @property {number} _1 - 1 key.
176 * @property {number} _2 - 2 key.
177 * @property {number} _3 - 3 key.
178 * @property {number} _4 - 4 key.
179 * @property {number} _5 - 5 key.
180 * @property {number} _6 - 6 key.
181 * @property {number} _7 - 7 key.
182 * @property {number} _8 - 8 key.
183 * @property {number} _9 - 9 key.
184 * @property {number} 0 - Alias for {@link CB_Keyboard.extended.VK._0}.
185 * @property {number} 1 - Alias for {@link CB_Keyboard.extended.VK._1}.
186 * @property {number} 2 - Alias for {@link CB_Keyboard.extended.VK._2}.
187 * @property {number} 3 - Alias for {@link CB_Keyboard.extended.VK._3}.
188 * @property {number} 4 - Alias for {@link CB_Keyboard.extended.VK._4}.
189 * @property {number} 5 - Alias for {@link CB_Keyboard.extended.VK._5}.
190 * @property {number} 6 - Alias for {@link CB_Keyboard.extended.VK._6}.
191 * @property {number} 7 - Alias for {@link CB_Keyboard.extended.VK._7}.
192 * @property {number} 8 - Alias for {@link CB_Keyboard.extended.VK._8}.
193 * @property {number} 9 - Alias for {@link CB_Keyboard.extended.VK._9}.
194 * @property {number} REWIND - RW (REWIND) key.
195 * @property {number} STOP - STOP key.
196 * @property {number} PLAY - PLAY key.
197 * @property {number} FAST_FWD - FF (FAST FORWARD) key.
198 * @property {number} BACK - BACK key.
199 * @property {number} PREV - PREVIOUS key.
200 * @property {number} NEXT - NEXT key.
201 * @property {number} INFO - INFORMATION key.
202 * @property {number} RED - RED key.
203 * @property {number} GREEN - GREEN key.
204 * @property {number} YELLOW - YELLOW key.
205 * @property {number} BLUE - BLUE key.
206 * @property {number} SPACE - SPACE key.
207 * @property {number} BACK_SPACE - BACK SPACE key.
208 * @property {number} A - A key.
209 * @property {number} B - B key.
210 * @property {number} C - C key.
211 * @property {number} D - D key.
212 * @property {number} E - E key.
213 * @property {number} F - F key.
214 * @property {number} G - G key.
215 * @property {number} H - H key.
216 * @property {number} I - I key.
217 * @property {number} J - J key.
218 * @property {number} K - K key.
219 * @property {number} L - L key.
220 * @property {number} M - M key.
221 * @property {number} N - N key.
222 * @property {number} O - O key.
223 * @property {number} P - P key.
224 * @property {number} Q - Q key.
225 * @property {number} R - R key.
226 * @property {number} S - S key.
227 * @property {number} T - T key.
228 * @property {number} U - U key.
229 * @property {number} V - V key.
230 * @property {number} W - W key.
231 * @property {number} X - X key.
232 * @property {number} Y - Y key.
233 * @property {number} Z - Z key.
234 * @property {number} VOLUME_UP - VOLUME UP key.
235 * @property {number} VOLUME_DOWN - VOLUME DOWN key.
236 * @property {number} MUTE - MUTE key.
237 * @property {number} PLAY_PAUSE - PLAY/PAUSE key.
238 * @property {number} HELP - HELP key.
239 * @property {number} SUBTITLE - SUBTITLE key.
240 * @property {number} SEARCH - SEARCH key.
241 * @property {number} AUDIODESCRIPTION - AUDIODESCRIPTION key.
242 * @property {number} HD - HD (High Definition) key.
243 */
244 CB_Keyboard.extended.VK =
245 {
246 //* Source: http://smarttv-alliance.org/Markets/Developers.aspx
247 ENTER: window.VK_ENTER || 13,
248 PAUSE: window.VK_PAUSE || 19,
249 PAGE_UP: window.VK_PAGE_UP || 33,
250 PAGE_DOWN: window.VK_PAGE_DOWN || 34,
251 LEFT: window.VK_LEFT || 37,
252 UP: window.VK_UP || 38,
253 RIGHT: window.VK_RIGHT || 39,
254 DOWN: window.VK_DOWN || 40,
255 _0: window.VK_0 || 48,
256 _1: window.VK_1 || 49,
257 _2: window.VK_2 || 50,
258 _3: window.VK_3 || 51,
259 _4: window.VK_4 || 52,
260 _5: window.VK_5 || 53,
261 _6: window.VK_6 || 54,
262 _7: window.VK_7 || 55,
263 _8: window.VK_8 || 56,
264 _9: window.VK_9 || 57,
265 REWIND: window.VK_REWIND || 412,
266 STOP: window.VK_STOP || 413,
267 PLAY: window.VK_PLAY || 415,
268 FAST_FWD: window.VK_FAST_FWD || 417,
269 BACK: window.VK_BACK || 461,
270 PREV: window.VK_PREV || 424,
271 NEXT: window.VK_NEXT || 425,
272 INFO: window.VK_INFO || 457,
273 RED: window.VK_RED || 403,
274 GREEN: window.VK_GREEN || 404,
275 YELLOW: window.VK_YELLOW || 405,
276 BLUE: window.VK_BLUE || 406,
277
278 //More virtual keyboard keys:
279 //* Source: https://fmtvp.github.io/tal/jsdoc/symbols/src/antie_static_script_events_keyevent.js.html
280 SPACE: window.VK_SPACE || 32,
281 BACK_SPACE: window.VK_BACK_SPACE || 8,
282 A: window.VK_A || 65,
283 B: window.VK_B || 66,
284 C: window.VK_C || 67,
285 D: window.VK_D || 68,
286 E: window.VK_E || 69,
287 F: window.VK_F || 70,
288 G: window.VK_G || 71,
289 H: window.VK_H || 72,
290 I: window.VK_I || 73,
291 J: window.VK_J || 74,
292 K: window.VK_K || 75,
293 L: window.VK_L || 76,
294 M: window.VK_M || 77,
295 N: window.VK_N || 78,
296 O: window.VK_O || 79,
297 P: window.VK_P || 80,
298 Q: window.VK_Q || 81,
299 R: window.VK_R || 82,
300 S: window.VK_S || 83,
301 T: window.VK_T || 84,
302 U: window.VK_U || 85,
303 V: window.VK_V || 86,
304 W: window.VK_W || 87,
305 X: window.VK_X || 88,
306 Y: window.VK_Y || 89,
307 Z: window.VK_Z || 90,
308 VOLUME_UP: window.VK_VOLUME_UP || 447,
309 VOLUME_DOWN: window.VK_VOLUME_DOWN || 448,
310 MUTE: window.VK_MUTE || 449,
311 PLAY_PAUSE: window.VK_PLAY_PAUSE || 402,
312 HELP: window.VK_HELP || 156,
313 SUBTITLE: window.VK_SUBTITLE || 460,
314 SEARCH: window.VK_SEARCH || 112, //112 is the same code as the F1 key.
315 AUDIODESCRIPTION: window.VK_AUDIODESCRIPTION || 113, //113 is the same code as the F2 key.
316 HD: window.VK_HD || 114 //114 is the same code as the F3 key.
317 };
318 CB_Keyboard.extended.VK[0] = CB_Keyboard.extended.VK._0;
319 CB_Keyboard.extended.VK[1] = CB_Keyboard.extended.VK._1;
320 CB_Keyboard.extended.VK[2] = CB_Keyboard.extended.VK._2;
321 CB_Keyboard.extended.VK[3] = CB_Keyboard.extended.VK._3;
322 CB_Keyboard.extended.VK[4] = CB_Keyboard.extended.VK._4;
323 CB_Keyboard.extended.VK[5] = CB_Keyboard.extended.VK._5;
324 CB_Keyboard.extended.VK[6] = CB_Keyboard.extended.VK._6;
325 CB_Keyboard.extended.VK[7] = CB_Keyboard.extended.VK._7;
326 CB_Keyboard.extended.VK[8] = CB_Keyboard.extended.VK._8;
327 CB_Keyboard.extended.VK[9] = CB_Keyboard.extended.VK._9;
328 CB_Keyboard.extended.VK._allowDuplicateKeyAliases = CB_Configuration[CB_BASE_NAME].CB_Keyboard_extended_VK_allowDuplicateKeyAliases;
329
330
331 /**
332 * Samsung Tizen TV key codes.
333 * @memberof CB_Keyboard.extended
334 * @name SAMSUNG_TIZEN_TV
335 * @constant
336 * @type {Object}
337 * @default
338 * @property {number} UP - UP button.
339 * @property {number} DOWN - DOWN button.
340 * @property {number} LEFT - LEFT button.
341 * @property {number} RIGHT - RIGHT button.
342 * @property {number} ENTER - ENTER button.
343 * @property {number} MEDIA_PLAY_PAUSE - PLAY/PAUSE MEDIA button.
344 * @property {number} MEDIA_REWIND - RW (REWIND) MEDIA button.
345 * @property {number} MEDIA_FORWARD - FW (FORWARD) MEDIA button.
346 * @property {number} MEDIA_PLAY - PLAY MEDIA button.
347 * @property {number} MEDIA_PAUSE - PAUSE MEDIA button.
348 * @property {number} MEDIA_STOP - STOP MEDIA button.
349 * @property {number} RETURN - RETURN button.
350 * @property {number} MEDIA_RECORD - RECORD MEDIA button.
351 * @property {number} MEDIA_TRACK_PREVIOUS - PREVIOUS TRACK MEDIA button.
352 * @property {number} MEDIA_TRACK_NEXT - NEXT TRACK MEDIA button.
353 * @property {number} VOLUME_UP - VOLUME UP button.
354 * @property {number} VOLUME_DOWN - VOLUME DOWN button.
355 * @property {number} MUTE - MUTE button.
356 * @property {number} _0 - 0 (zero) button.
357 * @property {number} _1 - 1 button.
358 * @property {number} _2 - 2 button.
359 * @property {number} _3 - 3 button.
360 * @property {number} _4 - 4 button.
361 * @property {number} _5 - 5 button.
362 * @property {number} _6 - 6 button.
363 * @property {number} _7 - 7 button.
364 * @property {number} _8 - 8 button.
365 * @property {number} _9 - 9 button.
366 * @property {number} 0 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._0}.
367 * @property {number} 1 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._1}.
368 * @property {number} 2 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._2}.
369 * @property {number} 3 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._3}.
370 * @property {number} 4 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._4}.
371 * @property {number} 5 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._5}.
372 * @property {number} 6 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._6}.
373 * @property {number} 7 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._7}.
374 * @property {number} 8 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._8}.
375 * @property {number} 9 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._9}.
376 * @property {number} RED - RED button.
377 * @property {number} GREEN - GREEN button.
378 * @property {number} YELLOW - YELLOW button.
379 * @property {number} BLUE - BLUE button.
380 * @property {number} INFO - INFORMATION button.
381 * @property {number} EXIT - EXIT button.
382 * @property {number} MINUS - MINUS button.
383 * @property {number} CAPTION - CAPTION button.
384 * @property {number} CH_UP - CHANNEL UP button.
385 * @property {number} CH_DOWN - CHANNEL DOWN button.
386 * @property {number} CH_PREVIOUS - PREVIOUS CHANNEL button.
387 * @property {number} CH_LIST - CHANNEL LIST button.
388 * @property {number} E_MANUAL - E-MANUAL button.
389 * @property {number} SEARCH - SEARCH button.
390 * @property {number} _3D - 3D button.
391 * @property {number} 3D - Alias for {@link CB_Keyboard.extended.SAMSUNG_TIZEN_TV._3D}.
392 * @property {number} GUIDE - GUIDE button.
393 * @property {number} SOURCE - SOURCE button.
394 * @property {number} PICTURE_SIZE - PICTURE SIZE button.
395 * @property {number} EXTRA - EXTRA button.
396 * @property {number} SOCCER - SOCCER button.
397 * @property {number} MTS - MTS (Multichannel Television Sound) button.
398 * @property {number} TELETEXT - TELETEXT button.
399 * @property {number} MENU - MENU button.
400 * @property {number} TOOLS - TOOLS button.
401 */
402 CB_Keyboard.extended.SAMSUNG_TIZEN_TV =
403 {
404 UP: 38,
405 DOWN: 40,
406 LEFT: 37,
407 RIGHT: 39,
408 ENTER: 13,
409 MEDIA_PLAY_PAUSE: 10252,
410 MEDIA_REWIND: 412,
411 MEDIA_FORWARD: 417,
412 MEDIA_PLAY: 415,
413 MEDIA_PAUSE: 19,
414 MEDIA_STOP: 413,
415 RETURN: 10009,
416 MEDIA_RECORD: 416,
417 MEDIA_TRACK_PREVIOUS: 10232,
418 MEDIA_TRACK_NEXT: 10233,
419 VOLUME_UP: 447,
420 VOLUME_DOWN: 448,
421 MUTE: 449,
422 _0: 48,
423 _1: 49,
424 _2: 50,
425 _3: 51,
426 _4: 52,
427 _5: 53,
428 _6: 54,
429 _7: 55,
430 _8: 56,
431 _9: 57,
432 RED: 403,
433 GREEN: 404,
434 YELLOW: 405,
435 BLUE: 406,
436 INFO: 457,
437 EXIT: 10182,
438 MINUS: 189,
439 CAPTION: 10221,
440 CH_UP: 427,
441 CH_DOWN: 428,
442 CH_PREVIOUS: 10190,
443 CH_LIST: 10073,
444 E_MANUAL: 10146,
445 SEARCH: 10225,
446 _3D: 10199,
447 GUIDE: 458,
448 SOURCE: 10072,
449 PICTURE_SIZE: 10140,
450 EXTRA: 10253,
451 SOCCER: 10228,
452 MTS: 10195,
453 TELETEXT: 10200,
454 MENU: 457,
455 TOOLS: 10135
456 };
457 CB_Keyboard.extended.SAMSUNG_TIZEN_TV[0] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._0;
458 CB_Keyboard.extended.SAMSUNG_TIZEN_TV[1] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._1;
459 CB_Keyboard.extended.SAMSUNG_TIZEN_TV[2] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._2;
460 CB_Keyboard.extended.SAMSUNG_TIZEN_TV[3] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._3;
461 CB_Keyboard.extended.SAMSUNG_TIZEN_TV[4] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._4;
462 CB_Keyboard.extended.SAMSUNG_TIZEN_TV[5] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._5;
463 CB_Keyboard.extended.SAMSUNG_TIZEN_TV[6] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._6;
464 CB_Keyboard.extended.SAMSUNG_TIZEN_TV[7] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._7;
465 CB_Keyboard.extended.SAMSUNG_TIZEN_TV[8] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._8;
466 CB_Keyboard.extended.SAMSUNG_TIZEN_TV[9] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._9;
467 CB_Keyboard.extended.SAMSUNG_TIZEN_TV["3D"] = CB_Keyboard.extended.SAMSUNG_TIZEN_TV._3D;
468
469
470 try { var tvKey = new Common.API.TVKeyValue(); } catch(E) { try { tvKey = sf.key; } catch(E) { tvKey = {}; } }
471 /**
472 * Samsung TV key codes.
473 * @memberof CB_Keyboard.extended
474 * @name SAMSUNG_TV
475 * @constant
476 * @type {Object}
477 * @default
478 * @property {number} TOOLS - TOOLS button.
479 * @property {number} EMODE - EMODE button.
480 * @property {number} DMA - DMA (Digital Media Adapter) button.
481 * @property {number} SOURCE - SOURCE button.
482 * @property {number} CHDOWN - CHANNEL DOWN button.
483 * @property {number} CHUP - CHANNEL UP button.
484 * @property {number} PANEL_CH_UP - CHANNEL UP PANEL button #1.
485 * @property {number} PANEL_CH_DOWN - CHANNEL DOWN PANEL button #1.
486 * @property {number} PANEL_CHUP - CHANNEL UP PANEL button #2.
487 * @property {number} PANEL_CHDOWN - CHANNEL DOWN PANEL button #2.
488 * @property {number} PIP_CHUP - CHANNEL UP PIP (Picture In Picture) button.
489 * @property {number} PIP_CHDOWN - CHANNEL DOWN PIP (Picture In Picture) button.
490 * @property {number} PRECH - PRE-CHANNEL (PREVIOUS CHANNEL) button.
491 * @property {number} FAVCH - FAVOURITE CHANNEL button.
492 * @property {number} CHLIST - CHANNEL LIST button.
493 * @property {number} TTX_MIX - TELETEXT button.
494 * @property {number} GUIDE - GUIDE button.
495 * @property {number} ASPECT - ASPECT button.
496 * @property {number} DOLBY_SRR - DOLBY SRR (SuRroundRight) button.
497 * @property {number} MTS - MTS (Multichannel Television Sound) button.
498 * @property {number} WHEELDOWN - WHEEL DOWN #1.
499 * @property {number} WHEEL_DOWN - WHEEL DOWN #2.
500 * @property {number} WHEELUP - WHEEL UP #1.
501 * @property {number} WHEEL_UP - WHEEL UP #2.
502 * @property {number} WHEELLEFT - WHEEL LEFT #1.
503 * @property {number} WHEEL_LEFT - WHEEL LEFT #2.
504 * @property {number} WHEELRIGHT - WHEEL RIGHT #1.
505 * @property {number} WHEEL_RIGHT - WHEEL RIGHT #2.
506 * @property {number} SMART - SMART TV button.
507 * @property {number} EXIT - EXIT button.
508 * @property {number} POWER - POWER button.
509 * @property {number} PANEL_POWER - POWER PANEL button.
510 * @property {number} POWEROFF - POWER OFF button.
511 * @property {number} POWERON - POWER ON button.
512 * @property {number} CONTENT - CONTENT button.
513 * @property {number} WLINK - WLINK (Wiselink) button #1.
514 * @property {number} W_LINK - WLINK (Wiselink) button #2.
515 * @property {number} EMPTY - EMPTY button.
516 * @property {number} CC - CC (Closed Captioning) button.
517 * @property {number} REC - REC button.
518 * @property {number} VOLUP - VOLUME UP button #1.
519 * @property {number} VOL_UP - VOLUME UP button #2.
520 * @property {number} VOLDOWN - VOLUME DOWN button #1.
521 * @property {number} VOL_DOWN - VOLUME DOWN button #2.
522 * @property {number} PANEL_VOLUP - PANEL VOLUME UP button #1.
523 * @property {number} PANEL_VOL_UP - PANEL VOLUME UP button #2.
524 * @property {number} PANEL_VOLDOW - PANEL VOLUME DOWN button #1.
525 * @property {number} PANEL_VOLDOWN - PANEL VOLUME DOWN button #2.
526 * @property {number} PANEL_VOL_DOWN - PANEL VOLUME DOWN button #3.
527 * @property {number} MUTE - MUTE button.
528 * @property {number} INFO - INFORMATION button.
529 * @property {number} INFOLINK - INFOLINK button.
530 * @property {number} MENU - MENU button.
531 * @property {number} SUBTITLE - SUBTITLE button #1.
532 * @property {number} SUB_TITLE - SUBTITLE button #2.
533 * @property {number} PANEL_SOURCE - SOURCE PANEL button.
534 * @property {number} _0 - 0 (zero) button.
535 * @property {number} _1 - 1 button.
536 * @property {number} _2 - 2 button.
537 * @property {number} _3 - 3 button.
538 * @property {number} _4 - 4 button.
539 * @property {number} _5 - 5 button.
540 * @property {number} _6 - 6 button.
541 * @property {number} _7 - 7 button.
542 * @property {number} _8 - 8 button.
543 * @property {number} _9 - 9 button.
544 * @property {number} _10 - 10 button.
545 * @property {number} _11 - 11 button.
546 * @property {number} _12 - 12 button.
547 * @property {number} 0 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._0}.
548 * @property {number} 1 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._1}.
549 * @property {number} 2 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._2}.
550 * @property {number} 3 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._3}.
551 * @property {number} 4 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._4}.
552 * @property {number} 5 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._5}.
553 * @property {number} 6 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._6}.
554 * @property {number} 7 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._7}.
555 * @property {number} 8 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._8}.
556 * @property {number} 9 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._9}.
557 * @property {number} 10 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._10}.
558 * @property {number} 11 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._11}.
559 * @property {number} 12 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._12}.
560 * @property {number} RED - RED button.
561 * @property {number} GREEN - GREEN button.
562 * @property {number} YELLOW - YELLOW button.
563 * @property {number} BLUE - BLUE button.
564 * @property {number} CYAN - CYAN button.
565 * @property {number} RW - RW (REWIND) button #1.
566 * @property {number} REWIND - RW (REWIND) button #2.
567 * @property {number} REWIND_ - RW (REWIND) button #3.
568 * @property {number} FF - FF (FAST FORWARD) button #1.
569 * @property {number} FF_ - FF (FAST FORWARD) button #2.
570 * @property {number} PAUSE - PAUSE button.
571 * @property {number} PLAY - PLAY button.
572 * @property {number} STOP - STOP button.
573 * @property {number} SEARCH - SEARCH button.
574 * @property {number} UP - UP button.
575 * @property {number} DOWN - DOWN button.
576 * @property {number} LEFT - LEFT button.
577 * @property {number} RIGHT - RIGHT button.
578 * @property {number} CH_UP - CHANNEL UP button.
579 * @property {number} CH_DOWN - CHANNEL DOWN button.
580 * @property {number} DISC_MENU - DISC MENU button.
581 * @property {number} _3D - 3D button.
582 * @property {number} 3D - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._3D}.
583 * @property {number} PIP_ONOFF - PIP (Picture In Picture) ON/OFF button.
584 * @property {number} AD - AD (Audio Description) button.
585 * @property {number} PMODE - PICTURE MODE button.
586 * @property {number} SMODE - SOUND MODE button.
587 * @property {number} SLEEP - SLEEP button.
588 * @property {number} D_AUDIO - DIGITAL AUDIO button.
589 * @property {number} D_FRONT_PLAY - DIGITAL FRONT PLAY button.
590 * @property {number} D_VIEW_MODE - DIGITAL VIEW MODE button.
591 * @property {number} STEP - STEP button.
592 * @property {number} CALLER_ID - CALLED ID button.
593 * @property {number} ANTENNA - ANTENNA button.
594 * @property {number} ZOOM_MOVE - MOVE ZOOM button.
595 * @property {number} ZOOM1 - ZOOM 1 button.
596 * @property {number} ZOOM2 - ZOOM 2 button.
597 * @property {number} ZOOM_IN - ZOOM IN button.
598 * @property {number} ZOOM_OUT - ZOOM OUT button.
599 * @property {number} RETURN - RETURN button.
600 * @property {number} PANEL_RETURN - RETURN PANEL button.
601 * @property {number} ENTER - ENTER button.
602 * @property {number} PANEL_ENTER - ENTER PANEL button.
603 * @property {number} PANEL_MENU - MENU PANEL button.
604 * @property {number} ADDDEL - ADD/DEL button.
605 * @property {number} PIP_SWAP - PIP (Picture In Picture) SWAP button.
606 * @property {number} PLUS100 - SAMSUNG AUTO MOTION PLUS 100 HZ button.
607 * @property {number} CAPTION - CAPTION button.
608 * @property {number} PICTURE_SIZE - PICTURE SIZE button.
609 * @property {number} PIP_SIZE - PIP (Picture In Picture) SIZE button.
610 * @property {number} MAGIC_CHANNEL - MAGIC CHANNEL button.
611 * @property {number} PIP_SCAN - PIP (Picture In Picture) SCAN button.
612 * @property {number} DEVICE_CONNECT - DEVICE CONNECT button.
613 * @property {number} HELP - HELP button.
614 * @property {number} CONVERGENCE - CONVERGENCE button.
615 * @property {number} AUTO_PROGRAM - AUTO PROGRAM button.
616 * @property {number} FACTORY - FACTORY button.
617 * @property {number} _3SPEED - 3SPEED button.
618 * @property {number} 3SPEED - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._3SPEED}.
619 * @property {number} RSURF - R.SURF button.
620 * @property {number} TOPMENU - TOP MENU button.
621 * @property {number} GAME - GAME button.
622 * @property {number} QUICK_REPLAY - QUICK REPLAY button.
623 * @property {number} STILL_PICTURE - STILL PICTURE button.
624 * @property {number} DTV - DTV (Digital Television) button.
625 * @property {number} INSTANT_REPLAY - INSTANT REPLAY button.
626 * @property {number} LINK - LINK button.
627 * @property {number} ANGLE - ANGLE button.
628 * @property {number} RESERVED1 - RESERVED1 button.
629 * @property {number} RESERVED5 - RESERVED5 button.
630 * @property {number} PROGRAM - PROGRAM button.
631 * @property {number} BOOKMARK - BOOKMARK button.
632 * @property {number} PRINT - PRINT button.
633 * @property {number} CLEAR - CLEAR button.
634 * @property {number} VCHIP - V-CHIP button.
635 * @property {number} REPEAT - REPEAT button.
636 * @property {number} DOOR - DOOR button.
637 * @property {number} OPEN - OPEN button.
638 * @property {number} TURBO - TURBO button.
639 * @property {number} DVR_MENU - DVR (Digital Video Recorder) MENU button.
640 * @property {number} TTX_SUBFACE - Teletext Subface button.
641 * @property {number} CH_LIST - CHANNEL LIST button.
642 * @property {number} DNIe - DNIe (Digital Natural Image Engine) button.
643 * @property {number} DNSe - DNSe (Digital Natural Sound Engine) button.
644 * @property {number} SRS - SRS (Sound Retrieval System) button.
645 * @property {number} CONVERT_AUDIO_MAINSUB - CONVERT AUDIO MAIN/SUB button.
646 * @property {number} MDC - MDC button.
647 * @property {number} SEFFECT - SOUND EFFECT button.
648 * @property {number} DVR - DVR (Digital Video Recorder) button.
649 * @property {number} DTV_SIGNAL - DTV (Digital Television) SIGNAL button.
650 * @property {number} LIVE - LIVE button.
651 * @property {number} PERPECT_FOCUS - PERPECT FOCUS button.
652 * @property {number} HOME - HOME button.
653 * @property {number} ESAVING - ENERGY SAVING button.
654 * @property {number} CONTENTS - CONTENTS button.
655 * @property {number} SCALE - SCALE button.
656 * @property {number} CLOCK_DISPLAY - CLOCK DISPLAY button.
657 * @property {number} SETUP_CLOCK_TIMER - SETUP CLOCK TIMER button.
658 * @property {number} MAGIC_BRIGHT - MAGIC BRIGHT button.
659 * @property {number} FM_RADIO - FM RADIO button.
660 * @property {number} VCR_MODE - VCR MODE button.
661 * @property {number} CATV_MODE - CATV (Community Antenna Television) MODE button.
662 * @property {number} DSS_MODE - DSS MODE button.
663 * @property {number} DVD_MODE - DVD MODE button.
664 * @property {number} STB_MODE - STB (Set-Top Box) MODE button.
665 * @property {number} PCMODE - PC MODE button.
666 * @property {number} TV_MODE - TV MODE button.
667 * @property {number} TV - TV button.
668 * @property {number} AV1 - AV #1 button.
669 * @property {number} AV2 - AV #2 button.
670 * @property {number} AV3 - AV #3 button.
671 * @property {number} SVIDEO1 - S-VIDEO (Separated-Video) #1 button.
672 * @property {number} SVIDEO2 - S-VIDEO (Separated-Video) #2 button.
673 * @property {number} SVIDEO3 - S-VIDEO (Separated-Video) #3 button.
674 * @property {number} COMPONENT1 - COMPONENT #1 button.
675 * @property {number} COMPONENT2 - COMPONENT #2 button.
676 * @property {number} DVI - DVI (Digital Visual Interface) button.
677 * @property {number} HDMI - HDMI button.
678 * @property {number} HDMI1 - HDMI #1 button.
679 * @property {number} HDMI2 - HDMI #2 button.
680 * @property {number} HDMI3 - HDMI #3 button.
681 * @property {number} HDMI4 - HDMI #4 button.
682 * @property {number} DTV_LINK - DTVLINK (DIGITAL TELEVISION LINK) button.
683 * @property {number} APP_LIST - APP LIST button.
684 * @property {number} BACK_MHP - BACK MHP (Multimedia Home Platform) button.
685 * @property {number} ALT_MHP - ALTERNATE MHP (Multimedia Home Platform) button.
686 * @property {number} RSS - RSS button.
687 * @property {number} ENTERTAINMENT - ENTERTAINMENT button.
688 * @property {number} ID_INPUT - ID INPUT button.
689 * @property {number} ID_SETUP - ID SETUP button.
690 * @property {number} ANYNET - ANYNET button.
691 * @property {number} ANYVIEW - ANYVIEW button.
692 * @property {number} MS - MS button.
693 * @property {number} MORE - MORE button.
694 * @property {number} _4_3 - 4:3 button.
695 * @property {number} 4_3 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._4_3}.
696 * @property {number} _16_9 - 16:9 button.
697 * @property {number} 16_9 - Alias for {@link CB_Keyboard.extended.SAMSUNG_TV._16_9}.
698 * @property {number} PANORAMA - PICTURE MODE PANORAMA button.
699 * @property {number} DYNAMIC - PICTURE MODE DYNAMIC button.
700 * @property {number} STANDARD - PICTURE MODE STANDARD button.
701 * @property {number} MOVIE1 - PICTURE MODE MOVIE1 button.
702 * @property {number} CUSTOM - PICTURE MODE CUSTOM button.
703 * @property {number} AUTO_ARC_RESET - AUTO ARC (Audio Return Channel) RESET button.
704 * @property {number} AUTO_ARC_LNA_ON - AUTO ARC (Audio Return Channel) LNA (Low Noise Amplifier) ON button.
705 * @property {number} AUTO_ARC_LNA_OFF - AUTO ARC (Audio Return Channel) LNA (Low Noise Amplifier) OFF button.
706 * @property {number} AUTO_ARC_ANYNET_MODE_OK - AUTO ARC (Audio Return Channel) ANYNET MODE OK button.
707 * @property {number} AUTO_ARC_ANYNET_AUTO_START - AUTO ARC (Audio Return Channel) ANYNET AUTO START button.
708 * @property {number} AUTO_ARC_CAPTION_ON - AUTO ARC (Audio Return Channel) CAPTION ON button.
709 * @property {number} AUTO_ARC_CAPTION_OFF - AUTO ARC (Audio Return Channel) CAPTION OFF button.
710 * @property {number} AUTO_ARC_PIP_DOUBLE - AUTO ARC (Audio Return Channel) PIP (Picture In Picture) DOUBLE button.
711 * @property {number} AUTO_ARC_PIP_LARGE - AUTO ARC (Audio Return Channel) PIP (Picture In Picture) LARGE button.
712 * @property {number} AUTO_ARC_PIP_SMALL - AUTO ARC (Audio Return Channel) PIP (Picture In Picture) SMALL button.
713 * @property {number} AUTO_ARC_PIP_WIDE - AUTO ARC (Audio Return Channel) PIP (Picture In Picture) WIDE button.
714 * @property {number} AUTO_ARC_PIP_LEFT_TOP - AUTO ARC (Audio Return Channel) PIP (Picture In Picture) LEFT TOP button.
715 * @property {number} AUTO_ARC_PIP_RIGHT_TOP - AUTO ARC (Audio Return Channel) PIP (Picture In Picture) RIGHT TOP button.
716 * @property {number} AUTO_ARC_PIP_LEFT_BOTTOM - AUTO ARC (Audio Return Channel) PIP (Picture In Picture) LEFT BOTTOM button.
717 * @property {number} AUTO_ARC_PIP_RIGHT_BOTTOM - AUTO ARC (Audio Return Channel) PIP (Picture In Picture) RIGHT BOTTOM button.
718 * @property {number} AUTO_ARC_PIP_CH_CHANGE - AUTO ARC (Audio Return Channel) PIP (Picture In Picture) CHANNEL CHANGE button.
719 * @property {number} AUTO_ARC_PIP_SOURCE_CHANGE - AUTO ARC (Audio Return Channel) PIP (Picture In Picture) SOURCE CHANGE button.
720 * @property {number} AUTO_ARC_AUTOCOLOR_SUCCESS - AUTO ARC (Audio Return Channel) AUTOCOLOR SUCCESS button.
721 * @property {number} AUTO_ARC_AUTOCOLOR_FAIL - AUTO ARC (Audio Return Channel) AUTOCOLOR FAIL button.
722 * @property {number} AUTO_ARC_C_FORCE_AGING - AUTO ARC (Audio Return Channel) C-FORCE AGING button.
723 * @property {number} AUTO_ARC_USBJACK_INSPECT - AUTO ARC (Audio Return Channel) USB JACK INSPECT button.
724 * @property {number} AUTO_ARC_JACK_IDENT - AUTO ARC (Audio Return Channel) JACK IDENT button.
725 * @property {number} AUTO_ARC_CAPTION_KOR - AUTO ARC (Audio Return Channel) CAPTION KOREAN button.
726 * @property {number} AUTO_ARC_CAPTION_ENG - AUTO ARC (Audio Return Channel) CAPTION ENGLISH button.
727 * @property {number} AUTO_ARC_ANTENNA_AIR - AUTO ARC (Audio Return Channel) ANTENNA AIR button.
728 * @property {number} AUTO_ARC_ANTENNA_CABLE - AUTO ARC (Audio Return Channel) ANTENNA CABLE button.
729 * @property {number} AUTO_ARC_ANTENNA_SATELLITE - AUTO ARC (Audio Return Channel) ANTENNA SATELLITE button.
730 * @property {number} AUTO_FORMAT - AUTO FORMAT button.
731 * @property {number} DNET - D-NET button.
732 * @property {number} NINE_SEPARATE - NINE SEPARATE button.
733 * @property {number} MIC - MIC (MICROPHONE) button.
734 * @property {number} EXT1 - EXT1 button.
735 * @property {number} EXT2 - EXT2 button.
736 * @property {number} EXT3 - EXT3 button.
737 * @property {number} EXT4 - EXT4 button.
738 * @property {number} EXT5 - EXT5 button.
739 * @property {number} EXT6 - EXT6 button.
740 * @property {number} EXT7 - EXT7 button.
741 * @property {number} EXT8 - EXT8 button.
742 * @property {number} EXT9 - EXT9 button.
743 * @property {number} EXT10 - EXT10 button.
744 * @property {number} EXT11 - EXT11 button.
745 * @property {number} EXT12 - EXT12 button.
746 * @property {number} EXT13 - EXT13 button.
747 * @property {number} EXT14 - EXT14 button.
748 * @property {number} EXT15 - EXT15 button.
749 * @property {number} EXT16 - EXT16 button.
750 * @property {number} EXT17 - EXT17 button.
751 * @property {number} EXT18 - EXT18 button.
752 * @property {number} EXT19 - EXT19 button.
753 * @property {number} EXT20 - EXT20 button.
754 * @property {number} EXT21 - EXT21 button.
755 * @property {number} EXT22 - EXT22 button.
756 * @property {number} EXT23 - EXT23 button.
757 * @property {number} EXT24 - EXT24 button.
758 * @property {number} EXT25 - EXT25 button.
759 * @property {number} EXT26 - EXT26 button.
760 * @property {number} EXT27 - EXT27 button.
761 * @property {number} EXT28 - EXT28 button.
762 * @property {number} EXT29 - EXT29 button.
763 * @property {number} EXT30 - EXT30 button.
764 * @property {number} EXT31 - EXT31 button.
765 * @property {number} EXT32 - EXT32 button.
766 * @property {number} EXT33 - EXT33 button.
767 * @property {number} EXT34 - EXT34 button.
768 * @property {number} EXT35 - EXT35 button.
769 * @property {number} EXT36 - EXT36 button.
770 * @property {number} EXT37 - EXT37 button.
771 * @property {number} EXT38 - EXT38 button.
772 * @property {number} EXT39 - EXT39 button.
773 * @property {number} EXT40 - EXT40 button.
774 * @property {number} EXT41 - EXT41 button.
775 */
776 //* Source: https://forum.samygo.tv/viewtopic.php?t=1792 and http://www.openremote.org/pages/viewpage.action?pageId=19434990 and https://github.com/Ape/samsungctl/issues/87
777 CB_Keyboard.extended.SAMSUNG_TV =
778 {
779 TOOLS: tvKey.KEY_TOOLS || tvKey.TOOLS, //Same code as "K" key (75).
780 EMODE: tvKey.KEY_EMODE || tvKey.EMODE, //148
781 DMA: tvKey.KEY_DMA || tvKey.DMA, //260
782 SOURCE: tvKey.KEY_SOURCE || tvKey.SOURCE, //222
783 CHDOWN: tvKey.KEY_CHDOWN || tvKey.CHDOWN,
784 CHUP: tvKey.KEY_CHUP || tvKey.CHUP,
785 PANEL_CH_UP: tvKey.KEY_PANEL_CH_UP || tvKey.PANEL_CH_UP, //105 (same code as "9" in the numeric pad).
786 PANEL_CH_DOWN: tvKey.KEY_PANEL_CH_DOWN || tvKey.PANEL_CH_DOWN, //106 (same code as asterisk ("*") in the numeric pad).
787 PANEL_CHUP: tvKey.KEY_PANEL_CHUP || tvKey.KEY_PANNEL_CHUP || tvKey.PANEL_CHUP || tvKey.PANNEL_CHUP,
788 PANEL_CHDOWN: tvKey.KEY_PANEL_CHDOWN || tvKey.KEY_PANNEL_CHDOWN || tvKey.PANEL_CHDOWN || tvKey.PANNEL_CHDOWN,
789 PIP_CHUP: tvKey.KEY_PIP_CHUP || tvKey.PIP_CHUP, //1050
790 PIP_CHDOWN: tvKey.KEY_PIP_CHDOWN || tvKey.PIP_CHDOWN, //1051
791 PRECH: tvKey.KEY_PRECH || tvKey.PRECH, //259
792 FAVCH: tvKey.KEY_FAVCH || tvKey.FAVCH, //256
793 CHLIST: tvKey.KEY_CHLIST || tvKey.CHLIST, //84 (same code as "T" key).
794 TTX_MIX: tvKey.KEY_TTX_MIX || tvKey.TTX_MIX, //650
795 GUIDE: tvKey.KEY_GUIDE || tvKey.GUIDE, //651
796 ASPECT: tvKey.KEY_ASPECT || tvKey.ASPECT, //653
797 DOLBY_SRR: tvKey.KEY_DOLBY_SRR || tvKey.DOLBY_SRR, //654
798 MTS: tvKey.KEY_MTS || tvKey.MTS, //655
799 WHEELDOWN: tvKey.KEY_WHEELDOWN || tvKey.WHEELDOWN, //29469
800 WHEEL_DOWN: tvKey.KEY_WHEEL_DOWN || tvKey.WHEEL_DOWN,
801 WHEELUP: tvKey.KEY_WHEELUP || tvKey.WHEELUP, //29468
802 WHEEL_UP: tvKey.KEY_WHEEL_UP || tvKey.WHEEL_UP,
803 WHEELLEFT: tvKey.KEY_WHEELLEFT || tvKey.WHEELLEFT,
804 WHEEL_LEFT: tvKey.KEY_WHEEL_LEFT || tvKey.WHEEL_LEFT,
805 WHEELRIGHT: tvKey.KEY_WHEELRIGHT || tvKey.WHEELRIGHT,
806 WHEEL_RIGHT: tvKey.KEY_WHEEL_RIGHT || tvKey.WHEEL_RIGHT,
807 SMART: tvKey.KEY_SMART || tvKey.SMART,
808 EXIT: tvKey.KEY_EXIT || tvKey.EXIT, //Same code as INS key (45).
809 POWER: tvKey.KEY_POWER || tvKey.POWER, //76 (same code as "L" key).
810 PANEL_POWER: tvKey.KEY_PANEL_POWER || tvKey.KEY_PANNEL_POWER || tvKey.PANEL_POWER || tvKey.PANNEL_POWER, //614
811 POWEROFF: tvKey.KEY_POWEROFF || tvKey.POWEROFF,
812 POWERON: tvKey.KEY_POWERON || tvKey.POWERON,
813 CONTENT: tvKey.KEY_CONTENT || tvKey.CONTENT, //261
814 WLINK: tvKey.KEY_WLINK || tvKey.WLINK, //115 (same code as F4 key)
815 W_LINK: tvKey.KEY_W_LINK || tvKey.W_LINK,
816 EMPTY: tvKey.KEY_EMPTY || tvKey.EMPTY, //0
817 CC: tvKey.KEY_CC || tvKey.CC, //118 (same code as F7 key)
818 REC: tvKey.KEY_REC || tvKey.REC, //192
819 VOLUP: tvKey.KEY_VOLUP || tvKey.VOLUP,
820 VOL_UP: tvKey.KEY_VOL_UP || tvKey.VOL_UP, //7
821 VOLDOWN: tvKey.KEY_VOLDOWN || tvKey.VOLDOWN,
822 VOL_DOWN: tvKey.KEY_VOL_DOWN || tvKey.VOL_DOWN, //1
823 PANEL_VOLUP: tvKey.KEY_PANEL_VOLUP || tvKey.KEY_PANNEL_VOLUP || tvKey.PANEL_VOLUP || tvKey.PANNEL_VOLUP,
824 PANEL_VOL_UP: tvKey.KEY_PANEL_VOL_UP || tvKey.PANEL_VOL_UP, //203
825 PANEL_VOLDOW: tvKey.KEY_PANEL_VOLDOW || tvKey.KEY_PANNEL_VOLDOW || tvKey.PANEL_VOLDOW || tvKey.PANNEL_VOLDOW,
826 PANEL_VOLDOWN: tvKey.KEY_PANEL_VOLDOWN || tvKey.KEY_PANNEL_VOLDOWN || tvKey.PANEL_VOLDOWN || tvKey.PANNEL_VOLDOWN,
827 PANEL_VOL_DOWN: tvKey.KEY_PANEL_VOL_DOWN || tvKey.PANEL_VOL_DOWN, //204
828 MUTE: tvKey.KEY_MUTE || tvKey.MUTE, //Same code as ESC key (27).
829 INFO: tvKey.KEY_INFO || tvKey.INFO, //31
830 INFOLINK: tvKey.KEY_INFOLINK || tvKey.INFOLINK, //147
831 MENU: tvKey.KEY_MENU || tvKey.MENU, //262
832 SUBTITLE: tvKey.KEY_SUBTITLE || tvKey.SUBTITLE, //652
833 SUB_TITLE: tvKey.KEY_SUB_TITLE || tvKey.SUB_TITLE, //1089
834 PANEL_SOURCE: tvKey.KEY_PANEL_SOURCE || tvKey.KEY_PANNEL_SOURCE || tvKey.PANEL_SOURCE || tvKey.PANNEL_SOURCE, //612
835 _0: tvKey.KEY_0 || tvKey.N0 || tvKey._0 || tvKey["0"], //17 (same code as CTRL or META key, depending on the system).
836 _1: tvKey.KEY_1 || tvKey.N1 || tvKey._1 || tvKey["1"], //101 (same code as "5" in the numeric pad).
837 _2: tvKey.KEY_2 || tvKey.N2 || tvKey._2 || tvKey["2"], //98 (same code as "2" in the numeric pad).
838 _3: tvKey.KEY_3 || tvKey.N3 || tvKey._3 || tvKey["3"], //6
839 _4: tvKey.KEY_4 || tvKey.N4 || tvKey._4 || tvKey["4"], //8
840 _5: tvKey.KEY_5 || tvKey.N5 || tvKey._5 || tvKey["5"], //9
841 _6: tvKey.KEY_6 || tvKey.N6 || tvKey._6 || tvKey["6"], //10
842 _7: tvKey.KEY_7 || tvKey.N7 || tvKey._7 || tvKey["7"], //12
843 _8: tvKey.KEY_8 || tvKey.N8 || tvKey._8 || tvKey["8"], //13
844 _9: tvKey.KEY_9 || tvKey.N9 || tvKey._9 || tvKey["9"], //14
845 _10: tvKey.KEY_10 || tvKey.N10 || tvKey._10 || tvKey["10"],
846 _11: tvKey.KEY_11 || tvKey.N11 || tvKey._11 || tvKey["11"],
847 _12: tvKey.KEY_12 || tvKey.N12 || tvKey._12 || tvKey["12"], //1057
848 RED: tvKey.KEY_RED || tvKey.RED, //Same code as SEPARATOR key (108).
849 GREEN: tvKey.KEY_GREEN || tvKey.GREEN, //Same code as CAPS_LOCK key (20).
850 YELLOW: tvKey.KEY_YELLOW || tvKey.YELLOW, //21
851 BLUE: tvKey.KEY_BLUE || tvKey.BLUE, //22
852 CYAN: tvKey.KEY_CYAN || tvKey.CYAN,
853 RW: tvKey.KEY_RW || tvKey.RW, //69 (same code as "E" key).
854 PAUSE: tvKey.KEY_PAUSE || tvKey.PAUSE, //74 (same code as "J" key).
855 FF: tvKey.KEY_FF || tvKey.FF, //72 (same code as "H" key).
856 FF_: tvKey.KEY_FF_ || tvKey.FF_, //1078
857 REWIND: tvKey.KEY_REWIND || tvKey.REWIND,
858 REWIND_: tvKey.KEY_REWIND_ || tvKey.REWIND_, //1080
859 PLAY: tvKey.KEY_PLAY || tvKey.PLAY, //71 (same code as "G" key).
860 STOP: tvKey.KEY_STOP || tvKey.STOP, //70 (same code as "F" key).
861 SEARCH: tvKey.KEY_SEARCH || tvKey.SEARCH,
862 UP: tvKey.KEY_UP || tvKey.UP, //29460.
863 DOWN: tvKey.KEY_DOWN || tvKey.DOWN, //29461
864 LEFT: tvKey.KEY_LEFT || tvKey.LEFT, //4
865 RIGHT: tvKey.KEY_RIGHT || tvKey.RIGHT, //5
866 CH_UP: tvKey.KEY_CH_UP || tvKey.CH_UP, //68 (same code as "D" key)
867 CH_DOWN: tvKey.KEY_CH_DOWN || tvKey.CH_DOWN, //65 (same code as "A" key)
868 DISC_MENU: tvKey.KEY_DISC_MENU || tvKey.DISC_MENU, //1086
869 _3D: tvKey.KEY_3D || tvKey._3D || tvKey["3D"], //1219
870 PIP_ONOFF: tvKey.KEY_PIP_ONOFF || tvKey.PIP_ONOFF, //1032
871 AD: tvKey.KEY_AD || tvKey.AD, //1039
872 PMODE: tvKey.KEY_PMODE || tvKey.PMODE, //1040
873 SMODE: tvKey.KEY_SMODE || tvKey.SMODE, //1043
874 SLEEP: tvKey.KEY_SLEEP || tvKey.SLEEP, //1097
875 D_AUDIO: tvKey.KEY_D_AUDIO || tvKey.D_AUDIO, //1236
876 D_FRONT_PLAY: tvKey.KEY_D_FRONT_PLAY || tvKey.D_FRONT_PLAY, //1243 (for BD)
877 D_VIEW_MODE: tvKey.KEY_D_VIEW_MODE || tvKey.D_VIEW_MODE, //1249
878 STEP: tvKey.KEY_STEP || tvKey.STEP, //1023 (REC PAUSE(BD))
879 CALLER_ID: tvKey.KEY_CALLER_ID || tvKey.CALLER_ID, //1128 (FULL SCREEN (BD))
880 ANTENNA: tvKey.KEY_ANTENA || tvKey.ANTENA || tvKey.KEY_ANTENNA || tvKey.ANTENNA, //1054 (for CN)
881 ZOOM_MOVE: tvKey.KEY_ZOOM_MOVE || tvKey.ZOOM_MOVE,
882 ZOOM1: tvKey.KEY_ZOOM1 || tvKey.ZOOM1, //1083
883 ZOOM2: tvKey.KEY_ZOOM2 || tvKey.ZOOM2,
884 ZOOM_IN: tvKey.KEY_ZOOM_IN || tvKey.ZOOM_IN,
885 ZOOM_OUT: tvKey.KEY_ZOOM_OUT || tvKey.ZOOM_OUT,
886 RETURN: tvKey.KEY_RETURN || tvKey.RETURN, //Same code as "X" key (88).
887 PANEL_RETURN: tvKey.KEY_PANEL_RETURN || tvKey.PANEL_RETURN,
888 ENTER: tvKey.KEY_ENTER || tvKey.ENTER, //29443
889 PANEL_ENTER: tvKey.KEY_PANEL_ENTER || tvKey.KEY_PANNEL_ENTER || tvKey.PANEL_ENTER || tvKey.PANNEL_ENTER, //309
890 PANEL_MENU: tvKey.KEY_PANEL_MENU || tvKey.KEY_PANNEL_MENU || tvKey.PANEL_MENU || tvKey.PANNEL_MENU, //613
891 ADDDEL: tvKey.KEY_ADDDEL || tvKey.ADDDEL,
892 PIP_SWAP: tvKey.KEY_PIP_SWAP || tvKey.PIP_SWAP,
893 PLUS100: tvKey.KEY_PLUS100 || tvKey.PLUS100,
894 CAPTION: tvKey.KEY_CAPTION || tvKey.CAPTION,
895 PICTURE_SIZE: tvKey.KEY_PICTURE_SIZE || tvKey.PICTURE_SIZE,
896 PIP_SIZE: tvKey.KEY_PIP_SIZE || tvKey.PIP_SIZE,
897 MAGIC_CHANNEL: tvKey.KEY_MAGIC_CHANNEL || tvKey.MAGIC_CHANNEL,
898 PIP_SCAN: tvKey.KEY_PIP_SCAN || tvKey.PIP_SCAN,
899 DEVICE_CONNECT: tvKey.KEY_DEVICE_CONNECT || tvKey.DEVICE_CONNECT,
900 HELP: tvKey.KEY_HELP || tvKey.HELP,
901 CONVERGENCE: tvKey.KEY_CONVERGENCE || tvKey.CONVERGENCE,
902 AUTO_PROGRAM: tvKey.KEY_AUTO_PROGRAM || tvKey.AUTO_PROGRAM,
903 FACTORY: tvKey.KEY_FACTORY || tvKey.FACTORY,
904 _3SPEED: tvKey.KEY_3SPEED || tvKey._3SPEED || tvKey["3SPEED"],
905 RSURF: tvKey.KEY_RSURF || tvKey.RSURF,
906 TOPMENU: tvKey.KEY_TOPMENU || tvKey.TOPMENU,
907 GAME: tvKey.KEY_GAME || tvKey.GAME,
908 QUICK_REPLAY: tvKey.KEY_QUICK_REPLAY || tvKey.QUICK_REPLAY,
909 STILL_PICTURE: tvKey.KEY_STILL_PICTURE || tvKey.STILL_PICTURE,
910 DTV: tvKey.KEY_DTV || tvKey.DTV,
911 INSTANT_REPLAY: tvKey.KEY_INSTANT_REPLAY || tvKey.INSTANT_REPLAY,
912 LINK: tvKey.KEY_LINK || tvKey.LINK,
913 ANGLE: tvKey.KEY_ANGLE || tvKey.ANGLE,
914 RESERVED1: tvKey.KEY_RESERVED1 || tvKey.RESERVED1,
915 RESERVED5: tvKey.KEY_RESERVED5 || tvKey.RESERVED5,
916 PROGRAM: tvKey.KEY_PROGRAM || tvKey.PROGRAM,
917 BOOKMARK: tvKey.KEY_BOOKMARK || tvKey.BOOKMARK,
918 PRINT: tvKey.KEY_PRINT || tvKey.PRINT,
919 CLEAR: tvKey.KEY_CLEAR || tvKey.CLEAR,
920 VCHIP: tvKey.KEY_VCHIP || tvKey.VCHIP,
921 REPEAT: tvKey.KEY_REPEAT || tvKey.REPEAT,
922 DOOR: tvKey.KEY_DOOR || tvKey.DOOR,
923 OPEN: tvKey.KEY_OPEN || tvKey.OPEN,
924 TURBO: tvKey.KEY_TURBO || tvKey.TURBO,
925 DVR_MENU: tvKey.KEY_DVR_MENU || tvKey.DVR_MENU,
926 TTX_SUBFACE: tvKey.KEY_TTX_SUBFACE || tvKey.TTX_SUBFACE,
927 CH_LIST: tvKey.KEY_CH_LIST || tvKey.CH_LIST,
928 DNIe: tvKey.KEY_DNIe || tvKey.KEY_DNIE || tvKey.DNIe || tvKey.DNIE,
929 DNSe: tvKey.KEY_DNSe || tvKey.KEY_DNSE || tvKey.DNSe || tvKey.DNSE,
930 SRS: tvKey.KEY_SRS || tvKey.SRS,
931 CONVERT_AUDIO_MAINSUB: tvKey.KEY_CONVERT_AUDIO_MAINSUB || tvKey.CONVERT_AUDIO_MAINSUB,
932 MDC: tvKey.KEY_MDC || tvKey.MDC,
933 SEFFECT: tvKey.KEY_SEFFECT || tvKey.SEFFECT,
934 DVR: tvKey.KEY_DVR || tvKey.DVR,
935 DTV_SIGNAL: tvKey.KEY_DTV_SIGNAL || tvKey.DTV_SIGNAL,
936 LIVE: tvKey.KEY_LIVE || tvKey.LIVE,
937 PERPECT_FOCUS: tvKey.KEY_PERPECT_FOCUS || tvKey.PERPECT_FOCUS,
938 HOME: tvKey.KEY_HOME || tvKey.HOME,
939 ESAVING: tvKey.KEY_ESAVING || tvKey.ESAVING,
940 CONTENTS: tvKey.KEY_CONTENTS || tvKey.CONTENTS,
941 SCALE: tvKey.KEY_SCALE || tvKey.SCALE,
942 CLOCK_DISPLAY: tvKey.KEY_CLOCK_DISPLAY || tvKey.CLOCK_DISPLAY,
943 SETUP_CLOCK_TIMER: tvKey.KEY_SETUP_CLOCK_TIMER || tvKey.SETUP_CLOCK_TIMER,
944 MAGIC_BRIGHT: tvKey.KEY_MAGIC_BRIGHT || tvKey.MAGIC_BRIGHT,
945 FM_RADIO: tvKey.KEY_FM_RADIO || tvKey.FM_RADIO,
946 VCR_MODE: tvKey.KEY_VCR_MODE || tvKey.VCR_MODE,
947 CATV_MODE: tvKey.KEY_CATV_MODE || tvKey.CATV_MODE,
948 DSS_MODE: tvKey.KEY_DSS_MODE || tvKey.DSS_MODE,
949 DVD_MODE: tvKey.KEY_DVD_MODE || tvKey.DVD_MODE,
950 STB_MODE: tvKey.KEY_STB_MODE || tvKey.STB_MODE,
951 PCMODE: tvKey.KEY_PCMODE || tvKey.PCMODE,
952 TV_MODE: tvKey.KEY_TV_MODE || tvKey.TV_MODE,
953 TV: tvKey.KEY_TV || tvKey.TV, //77
954 AV1: tvKey.KEY_AV1 || tvKey.AV1,
955 AV2: tvKey.KEY_AV2 || tvKey.AV2,
956 AV3: tvKey.KEY_AV3 || tvKey.AV3,
957 SVIDEO1: tvKey.KEY_SVIDEO1 || tvKey.SVIDEO1,
958 SVIDEO2: tvKey.KEY_SVIDEO2 || tvKey.SVIDEO2,
959 SVIDEO3: tvKey.KEY_SVIDEO3 || tvKey.SVIDEO3,
960 COMPONENT1: tvKey.KEY_COMPONENT1 || tvKey.COMPONENT1,
961 COMPONENT2: tvKey.KEY_COMPONENT2 || tvKey.COMPONENT2,
962 DVI: tvKey.KEY_DVI || tvKey.DVI,
963 HDMI: tvKey.KEY_HDMI || tvKey.HDMI,
964 HDMI1: tvKey.KEY_HDMI1 || tvKey.HDMI1,
965 HDMI2: tvKey.KEY_HDMI2 || tvKey.HDMI2,
966 HDMI3: tvKey.KEY_HDMI3 || tvKey.HDMI3,
967 HDMI4: tvKey.KEY_HDMI4 || tvKey.HDMI4,
968 DTV_LINK: tvKey.KEY_DTV_LINK || tvKey.DTV_LINK,
969 APP_LIST: tvKey.KEY_APP_LIST || tvKey.APP_LIST,
970 BACK_MHP: tvKey.KEY_BACK_MHP || tvKey.BACK_MHP,
971 ALT_MHP: tvKey.KEY_ALT_MHP || tvKey.ALT_MHP,
972 RSS: tvKey.KEY_RSS || tvKey.RSS,
973 ENTERTAINMENT: tvKey.KEY_ENTERTAINMENT || tvKey.ENTERTAINMENT,
974 ID_INPUT: tvKey.KEY_ID_INPUT || tvKey.ID_INPUT,
975 ID_SETUP: tvKey.KEY_ID_SETUP || tvKey.ID_SETUP,
976 ANYNET: tvKey.KEY_ANYNET || tvKey.ANYNET,
977 ANYVIEW: tvKey.KEY_ANYVIEW || tvKey.ANYVIEW,
978 MS: tvKey.KEY_MS || tvKey.MS,
979 MORE: tvKey.KEY_MORE || tvKey.MORE,
980 _4_3: tvKey.KEY_4_3 || tvKey._4_3 || tvKey["4_3"],
981 _16_9: tvKey.KEY_16_9 || tvKey._16_9 || tvKey["16_9"],
982 PANORAMA: tvKey.KEY_PANORAMA || tvKey.PANORAMA,
983 DYNAMIC: tvKey.KEY_DYNAMIC || tvKey.DYNAMIC,
984 STANDARD: tvKey.KEY_STANDARD || tvKey.STANDARD,
985 MOVIE1: tvKey.KEY_MOVIE1 || tvKey.MOVIE1,
986 CUSTOM: tvKey.KEY_CUSTOM || tvKey.CUSTOM,
987 AUTO_ARC_RESET: tvKey.KEY_AUTO_ARC_RESET || tvKey.AUTO_ARC_RESET,
988 AUTO_ARC_LNA_ON: tvKey.KEY_AUTO_ARC_LNA_ON || tvKey.AUTO_ARC_LNA_ON,
989 AUTO_ARC_LNA_OFF: tvKey.KEY_AUTO_ARC_LNA_OFF || tvKey.AUTO_ARC_LNA_OFF,
990 AUTO_ARC_ANYNET_MODE_OK: tvKey.KEY_AUTO_ARC_ANYNET_MODE_OK || tvKey.AUTO_ARC_ANYNET_MODE_OK,
991 AUTO_ARC_ANYNET_AUTO_START: tvKey.KEY_AUTO_ARC_ANYNET_AUTO_START || tvKey.AUTO_ARC_ANYNET_AUTO_START,
992 AUTO_ARC_CAPTION_ON: tvKey.KEY_AUTO_ARC_CAPTION_ON || tvKey.AUTO_ARC_CAPTION_ON,
993 AUTO_ARC_CAPTION_OFF: tvKey.KEY_AUTO_ARC_CAPTION_OFF || tvKey.AUTO_ARC_CAPTION_OFF,
994 AUTO_ARC_PIP_DOUBLE: tvKey.KEY_AUTO_ARC_PIP_DOUBLE || tvKey.AUTO_ARC_PIP_DOUBLE,
995 AUTO_ARC_PIP_LARGE: tvKey.KEY_AUTO_ARC_PIP_LARGE || tvKey.AUTO_ARC_PIP_LARGE,
996 AUTO_ARC_PIP_SMALL: tvKey.KEY_AUTO_ARC_PIP_SMALL || tvKey.AUTO_ARC_PIP_SMALL,
997 AUTO_ARC_PIP_WIDE: tvKey.KEY_AUTO_ARC_PIP_WIDE || tvKey.AUTO_ARC_PIP_WIDE,
998 AUTO_ARC_PIP_LEFT_TOP: tvKey.KEY_AUTO_ARC_PIP_LEFT_TOP || tvKey.AUTO_ARC_PIP_LEFT_TOP,
999 AUTO_ARC_PIP_RIGHT_TOP: tvKey.KEY_AUTO_ARC_PIP_RIGHT_TOP || tvKey.AUTO_ARC_PIP_RIGHT_TOP,
1000 AUTO_ARC_PIP_LEFT_BOTTOM: tvKey.KEY_AUTO_ARC_PIP_LEFT_BOTTOM || tvKey.AUTO_ARC_PIP_LEFT_BOTTOM,
1001 AUTO_ARC_PIP_RIGHT_BOTTOM: tvKey.KEY_AUTO_ARC_PIP_RIGHT_BOTTOM || tvKey.AUTO_ARC_PIP_RIGHT_BOTTOM,
1002 AUTO_ARC_PIP_CH_CHANGE: tvKey.KEY_AUTO_ARC_PIP_CH_CHANGE || tvKey.AUTO_ARC_PIP_CH_CHANGE,
1003 AUTO_ARC_PIP_SOURCE_CHANGE: tvKey.KEY_AUTO_ARC_PIP_SOURCE_CHANGE || tvKey.AUTO_ARC_PIP_SOURCE_CHANGE,
1004 AUTO_ARC_AUTOCOLOR_SUCCESS: tvKey.KEY_AUTO_ARC_AUTOCOLOR_SUCCESS || tvKey.AUTO_ARC_AUTOCOLOR_SUCCESS,
1005 AUTO_ARC_AUTOCOLOR_FAIL: tvKey.KEY_AUTO_ARC_AUTOCOLOR_FAIL || tvKey.AUTO_ARC_AUTOCOLOR_FAIL,
1006 AUTO_ARC_C_FORCE_AGING: tvKey.KEY_AUTO_ARC_C_FORCE_AGING || tvKey.AUTO_ARC_C_FORCE_AGING,
1007 AUTO_ARC_USBJACK_INSPECT: tvKey.KEY_AUTO_ARC_USBJACK_INSPECT || tvKey.AUTO_ARC_USBJACK_INSPECT,
1008 AUTO_ARC_JACK_IDENT: tvKey.KEY_AUTO_ARC_JACK_IDENT || tvKey.AUTO_ARC_JACK_IDENT,
1009 AUTO_ARC_CAPTION_KOR: tvKey.KEY_AUTO_ARC_CAPTION_KOR || tvKey.AUTO_ARC_CAPTION_KOR,
1010 AUTO_ARC_CAPTION_ENG: tvKey.KEY_AUTO_ARC_CAPTION_ENG || tvKey.AUTO_ARC_CAPTION_ENG,
1011 AUTO_ARC_ANTENNA_AIR: tvKey.KEY_AUTO_ARC_ANTENNA_AIR || tvKey.AUTO_ARC_ANTENNA_AIR,
1012 AUTO_ARC_ANTENNA_CABLE: tvKey.KEY_AUTO_ARC_ANTENNA_CABLE || tvKey.AUTO_ARC_ANTENNA_CABLE,
1013 AUTO_ARC_ANTENNA_SATELLITE: tvKey.KEY_AUTO_ARC_ANTENNA_SATELLITE || tvKey.AUTO_ARC_ANTENNA_SATELLITE,
1014 AUTO_FORMAT: tvKey.KEY_AUTO_FORMAT || tvKey.AUTO_FORMAT,
1015 DNET: tvKey.KEY_DNET || tvKey.DNET,
1016 NINE_SEPARATE: tvKey.KEY_NINE_SEPERATE || tvKey.NINE_SEPERATE || tvKey.KEY_NINE_SEPARATE || tvKey.NINE_SEPARATE,
1017 MIC: tvKey.KEY_MIC || tvKey.MIC,
1018 EXT1: tvKey.KEY_EXT1 || tvKey.EXT1,
1019 EXT2: tvKey.KEY_EXT2 || tvKey.EXT2,
1020 EXT3: tvKey.KEY_EXT3 || tvKey.EXT3,
1021 EXT4: tvKey.KEY_EXT4 || tvKey.EXT4,
1022 EXT5: tvKey.KEY_EXT5 || tvKey.EXT5,
1023 EXT6: tvKey.KEY_EXT6 || tvKey.EXT6,
1024 EXT7: tvKey.KEY_EXT7 || tvKey.EXT7,
1025 EXT8: tvKey.KEY_EXT8 || tvKey.EXT8,
1026 EXT9: tvKey.KEY_EXT9 || tvKey.EXT9,
1027 EXT10: tvKey.KEY_EXT10 || tvKey.EXT10,
1028 EXT11: tvKey.KEY_EXT11 || tvKey.EXT11,
1029 EXT12: tvKey.KEY_EXT12 || tvKey.EXT12,
1030 EXT13: tvKey.KEY_EXT13 || tvKey.EXT13,
1031 EXT14: tvKey.KEY_EXT14 || tvKey.EXT14,
1032 EXT15: tvKey.KEY_EXT15 || tvKey.EXT15,
1033 EXT16: tvKey.KEY_EXT16 || tvKey.EXT16,
1034 EXT17: tvKey.KEY_EXT17 || tvKey.EXT17,
1035 EXT18: tvKey.KEY_EXT18 || tvKey.EXT18,
1036 EXT19: tvKey.KEY_EXT19 || tvKey.EXT19,
1037 EXT20: tvKey.KEY_EXT20 || tvKey.EXT20,
1038 EXT21: tvKey.KEY_EXT21 || tvKey.EXT21,
1039 EXT22: tvKey.KEY_EXT22 || tvKey.EXT22,
1040 EXT23: tvKey.KEY_EXT23 || tvKey.EXT23,
1041 EXT24: tvKey.KEY_EXT24 || tvKey.EXT24,
1042 EXT25: tvKey.KEY_EXT25 || tvKey.EXT25,
1043 EXT26: tvKey.KEY_EXT26 || tvKey.EXT26,
1044 EXT27: tvKey.KEY_EXT27 || tvKey.EXT27,
1045 EXT28: tvKey.KEY_EXT28 || tvKey.EXT28,
1046 EXT29: tvKey.KEY_EXT29 || tvKey.EXT29,
1047 EXT30: tvKey.KEY_EXT30 || tvKey.EXT30,
1048 EXT31: tvKey.KEY_EXT31 || tvKey.EXT31,
1049 EXT32: tvKey.KEY_EXT32 || tvKey.EXT32,
1050 EXT33: tvKey.KEY_EXT33 || tvKey.EXT33,
1051 EXT34: tvKey.KEY_EXT34 || tvKey.EXT34,
1052 EXT35: tvKey.KEY_EXT35 || tvKey.EXT35,
1053 EXT36: tvKey.KEY_EXT36 || tvKey.EXT36,
1054 EXT37: tvKey.KEY_EXT37 || tvKey.EXT37,
1055 EXT38: tvKey.KEY_EXT38 || tvKey.EXT38,
1056 EXT39: tvKey.KEY_EXT39 || tvKey.EXT39,
1057 EXT40: tvKey.KEY_EXT40 || tvKey.EXT40,
1058 EXT41: tvKey.KEY_EXT41 || tvKey.EXT41
1059 };
1060 CB_Keyboard.extended.SAMSUNG_TV[0] = CB_Keyboard.extended.SAMSUNG_TV._0;
1061 CB_Keyboard.extended.SAMSUNG_TV[1] = CB_Keyboard.extended.SAMSUNG_TV._1;
1062 CB_Keyboard.extended.SAMSUNG_TV[2] = CB_Keyboard.extended.SAMSUNG_TV._2;
1063 CB_Keyboard.extended.SAMSUNG_TV[3] = CB_Keyboard.extended.SAMSUNG_TV._3;
1064 CB_Keyboard.extended.SAMSUNG_TV[4] = CB_Keyboard.extended.SAMSUNG_TV._4;
1065 CB_Keyboard.extended.SAMSUNG_TV[5] = CB_Keyboard.extended.SAMSUNG_TV._5;
1066 CB_Keyboard.extended.SAMSUNG_TV[6] = CB_Keyboard.extended.SAMSUNG_TV._6;
1067 CB_Keyboard.extended.SAMSUNG_TV[7] = CB_Keyboard.extended.SAMSUNG_TV._7;
1068 CB_Keyboard.extended.SAMSUNG_TV[8] = CB_Keyboard.extended.SAMSUNG_TV._8;
1069 CB_Keyboard.extended.SAMSUNG_TV[9] = CB_Keyboard.extended.SAMSUNG_TV._9;
1070 CB_Keyboard.extended.SAMSUNG_TV[10] = CB_Keyboard.extended.SAMSUNG_TV._10;
1071 CB_Keyboard.extended.SAMSUNG_TV[11] = CB_Keyboard.extended.SAMSUNG_TV._11;
1072 CB_Keyboard.extended.SAMSUNG_TV[12] = CB_Keyboard.extended.SAMSUNG_TV._12;
1073 CB_Keyboard.extended.SAMSUNG_TV["3D"] = CB_Keyboard.extended.SAMSUNG_TV._3D;
1074 CB_Keyboard.extended.SAMSUNG_TV["3SPEED"] = CB_Keyboard.extended.SAMSUNG_TV._3SPEED;
1075 CB_Keyboard.extended.SAMSUNG_TV["4_3"] = CB_Keyboard.extended.SAMSUNG_TV._4_3;
1076 CB_Keyboard.extended.SAMSUNG_TV["16_9"] = CB_Keyboard.extended.SAMSUNG_TV._16_9;
1077 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases = CB_Configuration[CB_BASE_NAME].CB_Keyboard_extended_SAMSUNG_TV_allowDuplicateKeyAliases;
1078
1079
1080 /**
1081 * Amazon Fire TV remote control key codes.
1082 * @memberof CB_Keyboard.extended
1083 * @name AMAZON_FIRE_TV_REMOTE
1084 * @constant
1085 * @type {Object}
1086 * @default
1087 * @property {number} UP - UP button.
1088 * @property {number} DOWN - DOWN button.
1089 * @property {number} LEFT - LEFT button.
1090 * @property {number} RIGHT - RIGHT button.
1091 * @property {number} SELECT - SELECT button.
1092 * @property {number} PLAY_PAUSE - PLAY/PAUSE button.
1093 * @property {number} RW - RW (REWIND) button.
1094 * @property {number} FF - FF (FAST FORWARD) button.
1095 */
1096 CB_Keyboard.extended.AMAZON_FIRE_TV_REMOTE =
1097 {
1098 UP: 38,
1099 DOWN: 40,
1100 LEFT: 37,
1101 RIGHT: 39,
1102 SELECT: 13,
1103 PLAY_PAUSE: 179,
1104 RW: 227,
1105 FF: 228
1106 };
1107
1108
1109 /**
1110 * Amazon Fire TV game controller key codes.
1111 * @memberof CB_Keyboard.extended
1112 * @name AMAZON_FIRE_TV_GAME_CONTROLLER
1113 * @constant
1114 * @type {Object}
1115 * @default
1116 * @property {number} UP - UP button.
1117 * @property {number} DOWN - DOWN button.
1118 * @property {number} LEFT - LEFT button.
1119 * @property {number} RIGHT - RIGHT button.
1120 * @property {number} A - "A" button.
1121 * @property {number} B - "B" button.
1122 * @property {number} X - "X" button.
1123 * @property {number} Y - "Y" button.
1124 */
1125 CB_Keyboard.extended.AMAZON_FIRE_TV_GAME_CONTROLLER =
1126 {
1127 UP: 38,
1128 DOWN: 40,
1129 LEFT: 37,
1130 RIGHT: 39,
1131 A: 13,
1132 B: 8, //Same as BACKSPACE.
1133 X: 13, //Same code as A button.
1134 Y: 13 //Same code as A button.
1135 }
1136
1137
1138 /**
1139 * Nintendo Wii (Wiimote) key codes.
1140 * @memberof CB_Keyboard.extended
1141 * @name WII
1142 * @constant
1143 * @type {Object}
1144 * @default
1145 * @property {number} UP - D-PAD UP button.
1146 * @property {number} DOWN - D-PAD DOWN button.
1147 * @property {number} LEFT - D-PAD LEFT button.
1148 * @property {number} RIGHT - D-PAD RIGHT button.
1149 * @property {number} A - "A" button.
1150 * @property {number} B - "B" button.
1151 * @property {number} MINUS - MINUS ("-") button.
1152 * @property {number} PLUS - PLUS ("+") button.
1153 * @property {number} ONE - "1" button.
1154 * @property {number} _1 - Alias for {@link CB_Keyboard.extended.WII.ONE}.
1155 * @property {number} 1 - Alias for {@link CB_Keyboard.extended.WII.ONE}.
1156 * @property {number} TWO - "2" button.
1157 * @property {number} _2 - Alias for {@link CB_Keyboard.extended.WII.TWO}.
1158 * @property {number} 2 - Alias for {@link CB_Keyboard.extended.WII.TWO}.
1159 * @property {number} HOME - HOME button.
1160 */
1161 //* Source: tomy @ https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
1162 CB_Keyboard.extended.WII =
1163 {
1164 UP: 175, //D-PAD: UP (also scrolls up). Note: same code as "VOL_UP" key.
1165 DOWN: 176, //D-PAD DOWN (also scrolls down). Note: same code as "MEDIA_FORWARD" key.
1166 LEFT: 178, //D-PAD LEFT (also scrolls left). Note: same code as "MEDIA_STOP" key.
1167 RIGHT: 177, //D-PAD RIGHT (also scrolls right). Note: same code as "MEDIA_BACK" key.
1168 A: 13, //"A" button. Note: same code as ENTER key.
1169 B: 171, //"B" button. Note: same code as BROWSER_FAVORITES key and PLUS ("+") in Firefox browser.
1170 MINUS: 170, //Minus ("-") button (also zooms out). Note: same code as BROWSER_SEARCH key.
1171 PLUS: 174, //Plus ("+") button (also zooms in). Note: same code as VOL_DOWN key.
1172 ONE: 172, //"1" button. Note: same code as BROWSER_HOME key.
1173 TWO: 173, //"2" button (also splits screen into single column mode). Note: same code as MUTE key and MINUS ("-") in Firefox browser.
1174 HOME: 2 //Home button (also leaves the browser).
1175 };
1176 CB_Keyboard.extended.WII[1] = CB_Keyboard.extended.WII._1 = CB_Keyboard.extended.WII.ONE; //"1" button. Note: same code as BROWSER_HOME key.
1177 CB_Keyboard.extended.WII[2] = CB_Keyboard.extended.WII._2 = CB_Keyboard.extended.WII.TWO; //"2" button (also splits screen into single column mode). Note: same code as MUTE key and MINUS ("-") in Firefox browser.
1178 CB_Keyboard.extended.WII._allowDuplicateKeyAliases = CB_Configuration[CB_BASE_NAME].CB_Keyboard_extended_WII_allowDuplicateKeyAliases;
1179
1180
1181 /**
1182 * Sony PlayStation 3 key codes.
1183 * @memberof CB_Keyboard.extended
1184 * @name PS3
1185 * @constant
1186 * @type {Object}
1187 * @default
1188 * @property {number} UP - UP button.
1189 * @property {number} DOWN - DOWN button.
1190 * @property {number} LEFT - LEFT button.
1191 * @property {number} RIGHT - RIGHT button.
1192 * @property {number} CROSS - CROSS button.
1193 */
1194 //* Source: tomy @ https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
1195 CB_Keyboard.extended.PS3 =
1196 {
1197 UP: 38,
1198 DOWN: 40,
1199 LEFT: 37,
1200 RIGHT: 39,
1201 CROSS: 63 //Caution, also clicks! Note: same code as "?" symbol key.
1202 //CIRCLE: 27 //Not sure.
1203 };
1204
1205
1206 /**
1207 * Sony PlayStation 4 key codes.
1208 * @memberof CB_Keyboard.extended
1209 * @name PS4
1210 * @constant
1211 * @type {Object}
1212 * @default
1213 * @property {number} UP - D-PAD UP button.
1214 * @property {number} DOWN - D-PAD DOWN button.
1215 * @property {number} LEFT - D-PAD LEFT button.
1216 * @property {number} RIGHT - D-PAD RIGHT button.
1217 * @property {number} TRIANGLE - TRIANGLE button.
1218 * @property {number} SQUARE - SQUARE button.
1219 * @property {number} CIRCLE - CIRCLE button.
1220 * @property {number} L1 - L1 button.
1221 * @property {number} L2 - L2 button.
1222 * @property {number} R1 - R1 button.
1223 * @property {number} R2 - R2 button.
1224 * @property {number} LEFT_STICK_CLICK - LEFT STICK CLICK button.
1225 * @property {number} RIGHT_STICK_CLICK - RIGHT STICK CLICK button.
1226 * @property {number} OPTIONS - OPTIONS button.
1227 */
1228 //* Source: http://coding.vdhdesign.co.nz/?p=351 (https://web.archive.org/web/20140222065645/http://coding.vdhdesign.co.nz/?p=351)
1229 CB_Keyboard.extended.PS4 =
1230 {
1231 UP: 38, //D-PAD: UP.
1232 DOWN: 40, //D-PAD: DOWN.
1233 LEFT: 37, //D-PAD: LEFT.
1234 RIGHT: 39, //D-PAD: RIGHT.
1235 TRIANGLE: 112, //Also initiates search bar. Note: same code as F1 key.
1236 SQUARE: 113, //Also initiates full screen mode. Note: same code as F2 key.
1237 CIRCLE: 27, //Browser history back. Note: same code as ESC key.
1238 //CROSS: undefined, //No keycode event was fired for this button, as this is used as a mouse left click.
1239 L1: 116, //History Back. It seems the web browser does not send any event for L1 button. Note: same codes as F5 key.
1240 L2: 118, //Goes to browser tab to the left. Note: same codes as F7 key.
1241 R1: 117, //History Forward. Note: same codes as F6 key.
1242 R2: 119, //Goes to browser tab to the right. Note: same codes as F8 key.
1243 LEFT_STICK_CLICK: 120, //Zooms browser out. Note: same codes as F9 key.
1244 RIGHT_STICK_CLICK: 121, //Zooms browser In. Note: same codes as F10 key.
1245 OPTIONS: 114 //Opens up options menu. Note: same codes as F3 key.
1246 //SHARE: undefined //Share Button (goes directly to a native application, no key code was fires).
1247 };
1248 CB_Keyboard.extended.PS4._allowDuplicateKeyAliases = CB_Configuration[CB_BASE_NAME].CB_Keyboard_extended_PS4_allowDuplicateKeyAliases;
1249
1250
1251 /**
1252 * Sony PlayStation Vita key codes.
1253 * @memberof CB_Keyboard.extended
1254 * @name PSVITA
1255 * @constant
1256 * @type {Object}
1257 * @default
1258 * @property {number} UP - UP button.
1259 * @property {number} DOWN - DOWN button.
1260 * @property {number} LEFT - LEFT button.
1261 * @property {number} RIGHT - RIGHT button.
1262 */
1263 //* Source: https://github.com/goldenratio/console-browsers-gamepad/tree/master/playstation
1264 CB_Keyboard.extended.PSVITA =
1265 {
1266 UP: 38, //UP.
1267 DOWN: 40, //DOWN.
1268 LEFT: 37, //LEFT.
1269 RIGHT: 39 //RIGHT.
1270 };
1271
1272
1273 /**
1274 * LG Smart TV (Linux 35230) key codes.
1275 * @memberof CB_Keyboard.extended
1276 * @name LG_SMART_TV_LINUX_35230
1277 * @constant
1278 * @type {Object}
1279 * @default
1280 * @property {number} _0 - 0 (zero) button.
1281 * @property {number} _1 - 1 button.
1282 * @property {number} _2 - 2 button.
1283 * @property {number} _3 - 3 button.
1284 * @property {number} _4 - 4 button.
1285 * @property {number} _5 - 5 button.
1286 * @property {number} _6 - 6 button.
1287 * @property {number} _7 - 7 button.
1288 * @property {number} _8 - 8 button.
1289 * @property {number} _9 - 9 button.
1290 * @property {number} 0 - Alias for {@link CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._0}.
1291 * @property {number} 1 - Alias for {@link CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._1}.
1292 * @property {number} 2 - Alias for {@link CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._2}.
1293 * @property {number} 3 - Alias for {@link CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._3}.
1294 * @property {number} 4 - Alias for {@link CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._4}.
1295 * @property {number} 5 - Alias for {@link CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._5}.
1296 * @property {number} 6 - Alias for {@link CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._6}.
1297 * @property {number} 7 - Alias for {@link CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._7}.
1298 * @property {number} 8 - Alias for {@link CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._8}.
1299 * @property {number} 9 - Alias for {@link CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._9}.
1300 * @property {number} FORWARD - FORWARD button.
1301 * @property {number} REWIND - REWIND button.
1302 * @property {number} PLAY - PLAY button.
1303 * @property {number} PAUSE - PAUSE button.
1304 */
1305 //* Source: tomy @ https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
1306 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230 =
1307 {
1308 //TODO: add more codes (if there is any more) and use them in CB_Keyboard.keys.
1309 _0: 48,
1310 _1: 49,
1311 _2: 50,
1312 _3: 51,
1313 _4: 52,
1314 _5: 53,
1315 _6: 54,
1316 _7: 55,
1317 _8: 56,
1318 _9: 57,
1319 FORWARD: 417, //Forward button.
1320 REWIND: 412, //Rewind button.
1321 PLAY: 445, //Play button.
1322 PAUSE: 19 //Pause button.
1323 };
1324 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230[0] = CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._0;
1325 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230[1] = CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._1;
1326 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230[2] = CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._2;
1327 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230[3] = CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._3;
1328 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230[4] = CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._4;
1329 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230[5] = CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._5;
1330 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230[6] = CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._6;
1331 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230[7] = CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._7;
1332 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230[8] = CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._8;
1333 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230[9] = CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._9;
1334
1335
1336 /**
1337 * Object whose properties are aliases for key codes (each property can contain an array with one or more integers which belong to the key codes).
1338 * @namespace
1339 * @type {Object}
1340 */
1341 CB_Keyboard.keys =
1342 {
1343 /**
1344 * The Escape (ESC) key.
1345 * @type {array}
1346 * @default
1347 */
1348 "ESC" : [27],
1349
1350 /**
1351 * The F1 key.
1352 * @type {array}
1353 * @default
1354 */
1355 "F1" : [112],
1356
1357 /**
1358 * The F2 key.
1359 * @type {array}
1360 * @default
1361 */
1362 "F2" : [113],
1363
1364 /**
1365 * The F3 key.
1366 * @type {array}
1367 * @default
1368 */
1369 "F3" : [114],
1370
1371 /**
1372 * The F4 key.
1373 * @type {array}
1374 * @default
1375 */
1376 "F4" : [115],
1377
1378 /**
1379 * The F5 key.
1380 * @type {array}
1381 * @default
1382 */
1383 "F5" : [116],
1384
1385 /**
1386 * The F6 key.
1387 * @type {array}
1388 * @default
1389 */
1390 "F6" : [117],
1391
1392 /**
1393 * The F7 key.
1394 * @type {array}
1395 * @default
1396 */
1397 "F7" : [118],
1398
1399 /**
1400 * The F8 key.
1401 * @type {array}
1402 * @default
1403 */
1404 "F8" : [119],
1405
1406 /**
1407 * The F9 key.
1408 * @type {array}
1409 * @default
1410 */
1411 "F9" : [120],
1412
1413 /**
1414 * The F10 key.
1415 * @type {array}
1416 * @default
1417 */
1418 "F10" : [121],
1419
1420 /**
1421 * The F11 key.
1422 * @type {array}
1423 * @default
1424 */
1425 "F11" : [122],
1426
1427 /**
1428 * The F12 key.
1429 * @type {array}
1430 * @default
1431 */
1432 "F12" : [123],
1433
1434 /**
1435 * The Control key.
1436 * @type {array}
1437 * @default
1438 */
1439 "CTRL" : [17, 162, 163],
1440
1441 /**
1442 * The Alt key.
1443 * @type {array}
1444 * @default
1445 */
1446 "ALT" : [18],
1447
1448 /**
1449 * The Shift (left or right) key.
1450 * @type {array}
1451 * @default
1452 */
1453 "SHIFT" : [16, 160, 161],
1454
1455 /**
1456 * The meta (Windows Start, Apple Command, etc.) key.
1457 * @type {array}
1458 * @default
1459 */
1460 "META" : [/*17,*/ 91, 92, 219, 220, 224],
1461
1462 /**
1463 * The up arrow key.
1464 * @type {array}
1465 * @default
1466 */
1467 "UP" :
1468 [
1469 38,
1470 CB_Keyboard.extended.WII._allowDuplicateKeyAliases ? CB_Keyboard.extended.WII.UP : null, //Note: same code as "VOL_UP" key (175).
1471 CB_Keyboard.extended.VK.UP, //Smart TV Alliance.
1472 CB_Keyboard.extended.SAMSUNG_TV.UP, //29460
1473 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.UP,
1474 CB_Keyboard.extended.AMAZON_FIRE_TV_REMOTE.UP,
1475 CB_Keyboard.extended.AMAZON_FIRE_TV_GAME_CONTROLLER.UP,
1476 CB_Keyboard.extended.PS3.UP,
1477 CB_Keyboard.extended.PS4.UP,
1478 CB_Keyboard.extended.PSVITA.UP
1479 ],
1480
1481 /**
1482 * The down arrow key.
1483 * @type {array}
1484 * @default
1485 */
1486 "DOWN" :
1487 [
1488 40,
1489 CB_Keyboard.extended.WII._allowDuplicateKeyAliases ? CB_Keyboard.extended.WII.DOWN : null, //Note: same code as "MEDIA_FORWARD" key (176).
1490 CB_Keyboard.extended.VK.DOWN, //Smart TV Alliance.
1491 CB_Keyboard.extended.SAMSUNG_TV.DOWN, //29461
1492 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.DOWN,
1493 CB_Keyboard.extended.AMAZON_FIRE_TV_REMOTE.DOWN,
1494 CB_Keyboard.extended.AMAZON_FIRE_TV_GAME_CONTROLLER.DOWN,
1495 CB_Keyboard.extended.PS3.DOWN,
1496 CB_Keyboard.extended.PS4.DOWN,
1497 CB_Keyboard.extended.PSVITA.DOWN
1498 ],
1499
1500 /**
1501 * The left arrow key.
1502 * @type {array}
1503 * @default
1504 */
1505 "LEFT" :
1506 [
1507 37,
1508 CB_Keyboard.extended.WII._allowDuplicateKeyAliases ? CB_Keyboard.extended.WII.LEFT : null, //Note: same code as "MEDIA_STOP" key (178).
1509 CB_Keyboard.extended.VK.LEFT, //Smart TV Alliance.
1510 CB_Keyboard.extended.SAMSUNG_TV.LEFT, //4
1511 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.LEFT,
1512 CB_Keyboard.extended.AMAZON_FIRE_TV_REMOTE.LEFT,
1513 CB_Keyboard.extended.AMAZON_FIRE_TV_GAME_CONTROLLER.LEFT,
1514 CB_Keyboard.extended.PS3.LEFT,
1515 CB_Keyboard.extended.PS4.LEFT,
1516 CB_Keyboard.extended.PSVITA.LEFT
1517 ],
1518
1519 /**
1520 * The right arrow key.
1521 * @type {array}
1522 * @default
1523 */
1524 "RIGHT" :
1525 [
1526 39,
1527 CB_Keyboard.extended.WII._allowDuplicateKeyAliases ? CB_Keyboard.extended.WII.RIGHT : null, //Note: same code as "MEDIA_BACK" key (177).
1528 CB_Keyboard.extended.VK.RIGHT, //Smart TV Alliance.
1529 CB_Keyboard.extended.SAMSUNG_TV.RIGHT, //5
1530 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.RIGHT,
1531 CB_Keyboard.extended.AMAZON_FIRE_TV_REMOTE.RIGHT,
1532 CB_Keyboard.extended.AMAZON_FIRE_TV_GAME_CONTROLLER.RIGHT,
1533 CB_Keyboard.extended.PS3.RIGHT,
1534 CB_Keyboard.extended.PS4.RIGHT,
1535 CB_Keyboard.extended.PSVITA.RIGHT
1536 ],
1537
1538 /**
1539 * The Enter (Return) key.
1540 * @type {array}
1541 * @default
1542 */
1543 "ENTER" :
1544 [
1545 13,
1546 //10, //Safari Mobile (probaby old). Source: http://mscerts.programming4.us/programming/coding%20javascript%20for%20mobile%20browsers%20%28part%2011%29.aspx
1547 CB_Keyboard.extended.VK.ENTER, //Smart TV Alliance.
1548 CB_Keyboard.extended.SAMSUNG_TV.ENTER, //29443
1549 CB_Keyboard.extended.SAMSUNG_TV.PANEL_ENTER, //309
1550 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.ENTER,
1551 CB_Keyboard.extended.PS3.CROSS, //Caution, also clicks! Note: same code as "?" symbol key.
1552 CB_Keyboard.extended.PS4._allowDuplicateKeyAliases ? CB_Keyboard.extended.PS4.SQUARE : null //Also initiates full screen mode. Note: same code as F2 key.
1553 ],
1554
1555 /**
1556 * The Backspace key.
1557 * @type {array}
1558 * @default
1559 */
1560 "BACKSPACE" :
1561 [
1562 8,
1563 127, //Safari Mobile (probaby old). Source: http://mscerts.programming4.us/programming/coding%20javascript%20for%20mobile%20browsers%20%28part%2011%29.aspx
1564 CB_Keyboard.extended.VK.BACK_SPACE
1565 ],
1566
1567 /**
1568 * The Spacebar key.
1569 * @type {array}
1570 * @default
1571 */
1572 "SPACEBAR" :
1573 [
1574 32,
1575 CB_Keyboard.extended.VK.SPACE
1576 ],
1577
1578 /**
1579 * The Tabulator (Tab) key.
1580 * @type {array}
1581 * @default
1582 */
1583 "TAB" : [9],
1584
1585 /**
1586 * The Caps Lock key.
1587 * @type {array}
1588 * @default
1589 */
1590 "CAPS_LOCK" : [20],
1591
1592 /**
1593 * The Num Lock (Numeric Lock) key.
1594 * @type {array}
1595 * @default
1596 */
1597
1598 "NUM_LOCK" : [144],
1599
1600 /**
1601 * The Scroll Lock key.
1602 * @type {array}
1603 * @default
1604 */
1605 "SCROLL_LOCK" : [145],
1606
1607
1608 /**
1609 * Alias for {@link CB_Keyboard.keys.0}.
1610 * @var CB_Keyboard.keys._0
1611 * @see {@link CB_Keyboard.keys.0}
1612 */
1613 /**
1614 * The 0 (zero) key.
1615 * @type {array}
1616 * @default
1617 */
1618 "0" :
1619 [
1620 48, //For keydown for normal keyboard and for keypress.
1621 96, //For keydown for numeric pad.
1622 CB_Keyboard.extended.VK._0, //Smart TV Alliance.
1623 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV._0 : null, //17 (same code as CTRL or META key, depending on the system).
1624 CB_Keyboard.extended.SAMSUNG_TIZEN_TV._0,
1625 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._0
1626 ],
1627
1628 /**
1629 * Alias for {@link CB_Keyboard.keys.1}.
1630 * @var CB_Keyboard.keys._1
1631 * @see {@link CB_Keyboard.keys.1}
1632 */
1633 /**
1634 * The 1 key.
1635 * @type {array}
1636 * @default
1637 */
1638 "1" :
1639 [
1640 49, //For keydown for normal keyboard and for keypress.
1641 97, //For keydown for numeric pad.
1642 CB_Keyboard.extended.VK._1, //Smart TV Alliance.
1643 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV._1 : null, //101 (same code as "5" in the numeric pad).
1644 CB_Keyboard.extended.SAMSUNG_TIZEN_TV._1,
1645 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._1
1646 ],
1647
1648 /**
1649 * Alias for {@link CB_Keyboard.keys.2}.
1650 * @var CB_Keyboard.keys._2
1651 * @see {@link CB_Keyboard.keys.2}
1652 */
1653 /**
1654 * The 2 key.
1655 * @type {array}
1656 * @default
1657 */
1658 "2" :
1659 [
1660 50, //For keydown for normal keyboard and for keypress.
1661 98, //For keydown for numeric pad.
1662 CB_Keyboard.extended.VK._2, //Smart TV Alliance.
1663 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV._2 : null, //98 (same code as "2" in the numeric pad).
1664 CB_Keyboard.extended.SAMSUNG_TIZEN_TV._2,
1665 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._2
1666 ],
1667
1668 /**
1669 * Alias for {@link CB_Keyboard.keys.3}.
1670 * @var CB_Keyboard.keys._3
1671 * @see {@link CB_Keyboard.keys.3}
1672 */
1673 /**
1674 * The 3 key.
1675 * @type {array}
1676 * @default
1677 */
1678 "3" :
1679 [
1680 51, //For keydown for normal keyboard and for keypress.
1681 99, //For keydown for numeric pad.
1682 CB_Keyboard.extended.VK._3, //Smart TV Alliance.
1683 CB_Keyboard.extended.SAMSUNG_TV._3, //6
1684 CB_Keyboard.extended.SAMSUNG_TIZEN_TV._3,
1685 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._3
1686 ],
1687
1688 /**
1689 * Alias for {@link CB_Keyboard.keys.4}.
1690 * @var CB_Keyboard.keys._4
1691 * @see {@link CB_Keyboard.keys.4}
1692 */
1693 /**
1694 * The 4 key.
1695 * @type {array}
1696 * @default
1697 */
1698 "4" :
1699 [
1700 52, //For keydown for normal keyboard and for keypress.
1701 100, //For keydown for numeric pad.
1702 CB_Keyboard.extended.VK._4, //Smart TV Alliance.
1703 CB_Keyboard.extended.SAMSUNG_TV._4, //8
1704 CB_Keyboard.extended.SAMSUNG_TIZEN_TV._4,
1705 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._4
1706 ],
1707
1708 /**
1709 * Alias for {@link CB_Keyboard.keys.5}.
1710 * @var CB_Keyboard.keys._5
1711 * @see {@link CB_Keyboard.keys.5}
1712 */
1713 /**
1714 * The 5 key.
1715 * @type {array}
1716 * @default
1717 */
1718 "5" :
1719 [
1720 53, //For keydown for normal keyboard and for keypress.
1721 101, //For keydown for numeric pad.
1722 CB_Keyboard.extended.VK._5, //Smart TV Alliance.
1723 CB_Keyboard.extended.SAMSUNG_TV._5, //9
1724 CB_Keyboard.extended.SAMSUNG_TIZEN_TV._5,
1725 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._5
1726 ],
1727
1728 /**
1729 * Alias for {@link CB_Keyboard.keys.6}.
1730 * @var CB_Keyboard.keys._6
1731 * @see {@link CB_Keyboard.keys.6}
1732 */
1733 /**
1734 * The 6 key.
1735 * @type {array}
1736 * @default
1737 */
1738 "6" :
1739 [
1740 54, //For keydown for normal keyboard and for keypress.
1741 102, //For keydown for numeric pad.
1742 CB_Keyboard.extended.VK._6, //Smart TV Alliance.
1743 CB_Keyboard.extended.SAMSUNG_TV._6, //10
1744 CB_Keyboard.extended.SAMSUNG_TIZEN_TV._6,
1745 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._6
1746 ],
1747
1748 /**
1749 * Alias for {@link CB_Keyboard.keys.7}.
1750 * @var CB_Keyboard.keys._7
1751 * @see {@link CB_Keyboard.keys.7}
1752 */
1753 /**
1754 * The 7 key.
1755 * @type {array}
1756 * @default
1757 */
1758 "7" :
1759 [
1760 55, //For keydown for normal keyboard and for keypress.
1761 103, //For keydown for numeric pad.
1762 CB_Keyboard.extended.VK._7, //Smart TV Alliance.
1763 CB_Keyboard.extended.SAMSUNG_TV._7, //12
1764 CB_Keyboard.extended.SAMSUNG_TIZEN_TV._7,
1765 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._7
1766 ],
1767
1768 /**
1769 * Alias for {@link CB_Keyboard.keys.8}.
1770 * @var CB_Keyboard.keys._8
1771 * @see {@link CB_Keyboard.keys.8}
1772 */
1773 /**
1774 * The 8 key.
1775 * @type {array}
1776 * @default
1777 */
1778 "8" :
1779 [
1780 56, //For keydown for normal keyboard and for keypress.
1781 104, //For keydown for numeric pad.
1782 CB_Keyboard.extended.VK._8, //Smart TV Alliance.
1783 CB_Keyboard.extended.SAMSUNG_TV._8, //13
1784 CB_Keyboard.extended.SAMSUNG_TIZEN_TV._8,
1785 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._8
1786 ],
1787
1788 /**
1789 * Alias for {@link CB_Keyboard.keys.9}.
1790 * @var CB_Keyboard.keys._9
1791 * @see {@link CB_Keyboard.keys.9}
1792 */
1793 /**
1794 * The 9 key.
1795 * @type {array}
1796 * @default
1797 */
1798 "9" :
1799 [
1800 57, //For keydown for normal keyboard and for keypress.
1801 105, //For keydown for numeric pad.
1802 CB_Keyboard.extended.VK._9, //Smart TV Alliance.
1803 CB_Keyboard.extended.SAMSUNG_TV._9, //14
1804 CB_Keyboard.extended.SAMSUNG_TIZEN_TV._9,
1805 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230._9
1806 ],
1807
1808 /**
1809 * The "+" (plus) symbol key. NOTE: In some keyboards (for example in Chinese ones), you have to press EQUAL (code 61) with SHIFT to access to "+".
1810 * @type {array}
1811 * @default
1812 */
1813 "PLUS" :
1814 [
1815 107, //For keydown for numeric pad.
1816 171, //For keydown for normal keyboard in Firefox.
1817 187 //For keydown for normal keyboard in Chrome and IE8.
1818 ],
1819
1820 /**
1821 * The "-" (minus) symbol key.
1822 * @type {array}
1823 * @default
1824 */
1825 "MINUS" :
1826 [
1827 109, //For keydown for numeric pad.
1828 173, //For keydown for normal keyboard in Firefox. Note: 173 is also used for "MUTE"
1829 189, //For keydown for normal keyboard in Chrome and IE8.
1830 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MINUS
1831 ],
1832
1833 /**
1834 * The "&amp;#42;" (asterisk) symbol key. NOTE: In some keyboards (for example in Spanish for Spain ones), you have to press PLUS (code 187) with SHIFT to access to "*".
1835 * @type {array}
1836 * @default
1837 */
1838 "ASTERISK" :
1839 [
1840 //Note: For * and #, Nokia and Samsung report a keyCode of 56/51, Sony Ericsson reports a keyCode of 83/72, onkeypress Nokia, Samsung and Sony Ericsson report both as 42/35.
1841 //* Source: http://www.quirksmode.org/m/table.html
1842 106 //For keydown for numeric pad.
1843 ],
1844
1845 /**
1846 * The "/" (slash) symbol key. NOTE: In some keyboards (for example in Spanish for Spain ones), you have to press 7 (code 55) with SHIFT to access to "/".
1847 * @type {array}
1848 * @default
1849 */
1850 "SLASH" :
1851 [
1852 111 //For keydown for numeric pad.
1853 ],
1854
1855 /**
1856 * The "." (dot) symbol key.
1857 * @type {array}
1858 * @default
1859 */
1860 "DOT" :
1861 [
1862 190 //For keydown for normal keyboard.
1863 ],
1864
1865 /**
1866 * The "," (comma) symbol key.
1867 * @type {array}
1868 * @default
1869 */
1870 "COMMA" :
1871 [
1872 188 //For keydown for normal keyboard.
1873 ],
1874
1875 /**
1876 * The Home key.
1877 * @type {array}
1878 * @default
1879 */
1880 "HOME" :
1881 [
1882 36,
1883 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.HOME : null
1884 ],
1885
1886 /**
1887 * The End key.
1888 * @type {array}
1889 * @default
1890 */
1891 "END" : [35],
1892
1893 /**
1894 * The Page Up key.
1895 * @type {array}
1896 * @default
1897 */
1898 "PAGE_UP" :
1899 [
1900 33,
1901 CB_Keyboard.extended.VK.PAGE_UP
1902 ],
1903
1904 /**
1905 * The Page Down key.
1906 * @type {array}
1907 * @default
1908 */
1909 "PAGE_DOWN" :
1910 [
1911 34,
1912 CB_Keyboard.extended.VK.PAGE_DOWN
1913 ],
1914
1915 /**
1916 * The Ins (Insert) key.
1917 * @type {array}
1918 * @default
1919 */
1920 "INS" : [45],
1921
1922 /**
1923 * The Del (Delete) key.
1924 * @type {array}
1925 * @default
1926 */
1927 "DEL" : [46],
1928
1929 /**
1930 * The "A" key.
1931 * @type {array}
1932 * @default
1933 */
1934 "A" : [65, CB_Keyboard.extended.VK.A],
1935
1936 /**
1937 * The "B" key.
1938 * @type {array}
1939 * @default
1940 */
1941 "B" : [66, CB_Keyboard.extended.VK.B],
1942
1943 /**
1944 * The "C" key.
1945 * @type {array}
1946 * @default
1947 */
1948 "C" : [67, CB_Keyboard.extended.VK.C],
1949
1950 /**
1951 * The "D" key.
1952 * @type {array}
1953 * @default
1954 */
1955 "D" : [68, CB_Keyboard.extended.VK.D],
1956
1957 /**
1958 * The "E" key.
1959 * @type {array}
1960 * @default
1961 */
1962 "E" : [69, CB_Keyboard.extended.VK.E],
1963
1964 /**
1965 * The "F" key.
1966 * @type {array}
1967 * @default
1968 */
1969 "F" : [70, CB_Keyboard.extended.VK.F],
1970
1971 /**
1972 * The "G" key.
1973 * @type {array}
1974 * @default
1975 */
1976 "G" : [71, CB_Keyboard.extended.VK.G],
1977
1978 /**
1979 * The "H" key.
1980 * @type {array}
1981 * @default
1982 */
1983 "H" : [72, CB_Keyboard.extended.VK.H],
1984
1985 /**
1986 * The "I" key.
1987 * @type {array}
1988 * @default
1989 */
1990 "I" : [73, CB_Keyboard.extended.VK.I],
1991
1992 /**
1993 * The "J" key.
1994 * @type {array}
1995 * @default
1996 */
1997 "J" : [74, CB_Keyboard.extended.VK.J],
1998
1999 /**
2000 * The "K" key.
2001 * @type {array}
2002 * @default
2003 */
2004 "K" : [75, CB_Keyboard.extended.VK.K],
2005
2006 /**
2007 * The "L" key.
2008 * @type {array}
2009 * @default
2010 */
2011 "L" : [76, CB_Keyboard.extended.VK.L],
2012
2013 /**
2014 * The "M" key.
2015 * @type {array}
2016 * @default
2017 */
2018 "M" : [77, CB_Keyboard.extended.VK.M],
2019
2020 /**
2021 * The "N" key.
2022 * @type {array}
2023 * @default
2024 */
2025 "N" : [78, CB_Keyboard.extended.VK.N],
2026
2027 /**
2028 * The "O" key.
2029 * @type {array}
2030 * @default
2031 */
2032 "O" : [79, CB_Keyboard.extended.VK.O],
2033
2034 /**
2035 * The "P" key.
2036 * @type {array}
2037 * @default
2038 */
2039 "P" : [80, CB_Keyboard.extended.VK.P],
2040
2041 /**
2042 * The "Q" key.
2043 * @type {array}
2044 * @default
2045 */
2046 "Q" : [81, CB_Keyboard.extended.VK.Q],
2047
2048 /**
2049 * The "R" key.
2050 * @type {array}
2051 * @default
2052 */
2053 "R" : [82, CB_Keyboard.extended.VK.R],
2054
2055 /**
2056 * The "S" key.
2057 * @type {array}
2058 * @default
2059 */
2060 "S" : [83, CB_Keyboard.extended.VK.S],
2061
2062 /**
2063 * The "T" key.
2064 * @type {array}
2065 * @default
2066 */
2067 "T" : [84, CB_Keyboard.extended.VK.T],
2068
2069 /**
2070 * The "U" key.
2071 * @type {array}
2072 * @default
2073 */
2074 "U" : [85, CB_Keyboard.extended.VK.U],
2075
2076 /**
2077 * The "V" key.
2078 * @type {array}
2079 * @default
2080 */
2081 "V" : [86, CB_Keyboard.extended.VK.V],
2082
2083 /**
2084 * The "W" key.
2085 * @type {array}
2086 * @default
2087 */
2088 "W" : [87, CB_Keyboard.extended.VK.W],
2089
2090 /**
2091 * The "X" key.
2092 * @type {array}
2093 * @default
2094 */
2095 "X" : [88, CB_Keyboard.extended.VK.X],
2096
2097 /**
2098 * The "Y" key.
2099 * @type {array}
2100 * @default
2101 */
2102 "Y" : [89, CB_Keyboard.extended.VK.Y],
2103
2104 /**
2105 * The "Z" key.
2106 * @type {array}
2107 * @default
2108 */
2109 "Z" : [90, CB_Keyboard.extended.VK.Z],
2110
2111 /**
2112 * The Pause key.
2113 * @type {array}
2114 * @default
2115 */
2116 "PAUSE" :
2117 [
2118 19,
2119 CB_Keyboard.extended.VK.PAUSE, //Smart TV Alliance.
2120 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.PAUSE : null, //74 (same code as "J" key).
2121 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MEDIA_PAUSE,
2122 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230.PAUSE
2123 ],
2124
2125 /**
2126 * The Clear key.
2127 * @type {array}
2128 * @default
2129 */
2130 "CLEAR" :
2131 [
2132 12,
2133 254,
2134 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.CLEAR : null
2135 ],
2136
2137 /**
2138 * The Select key (for Windows' Virtual keyboard).
2139 * @type {array}
2140 * @default
2141 */
2142 "SELECT" : [41],
2143
2144 /**
2145 * The Print key.
2146 * @type {array}
2147 * @default
2148 */
2149 "PRINT" :
2150 [
2151 42,
2152 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.PRINT : null
2153 ],
2154
2155 /**
2156 * The Print Screen key.
2157 * @type {array}
2158 * @default
2159 */
2160 "PRINT_SCREEN" : [44], //Print screen key. Note: 44 is the same code as comma (",") keypress code.
2161
2162 /**
2163 * The Execute key.
2164 * @type {array}
2165 * @default
2166 */
2167 "EXECUTE" : [43], //Execute key. Note: 43 is the same code as plus ("+") keypress code.
2168
2169 /**
2170 * The Help key.
2171 * @type {array}
2172 * @default
2173 */
2174 "HELP" : //Help key. Note: 47 is the same code as slash ("/") keypress code:
2175 [
2176 47,
2177 CB_Keyboard.extended.VK.HELP,
2178 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.HELP : null
2179 ],
2180
2181 /**
2182 * The Apps (Applications) key.
2183 * @type {array}
2184 * @default
2185 */
2186 "APPS" : [93],
2187
2188 /**
2189 * The Sleep key.
2190 * @type {array}
2191 * @default
2192 */
2193 "SLEEP" :
2194 [
2195 95,
2196 CB_Keyboard.extended.SAMSUNG_TV.SLEEP //1097
2197 ],
2198
2199 /**
2200 * The Separator key.
2201 * @type {array}
2202 * @default
2203 */
2204 "SEPARATOR" : [108], //Separator key. Note: 108 is the same code as L lowercase ("l") keypress code.
2205
2206 /**
2207 * The Decimal key (for numeric pads). NOTE: In some decimal systems, as in Spanish, it is a comma (","). Normally, numeric keypads in Spanish for Spain keyboards show a dot (".") but others as German keyboards shows a comma (",").
2208 * @type {array}
2209 * @default
2210 */
2211 "DECIMAL" : [110],
2212
2213 /**
2214 * The Menu key.
2215 * @type {array}
2216 * @default
2217 */
2218 "MENU" :
2219 [
2220 164,
2221 165,
2222 CB_Keyboard.extended.SAMSUNG_TV.MENU, //262
2223 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.PANEL_MENU : null,
2224 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MENU
2225 ],
2226
2227 /**
2228 * The mouse's left button (for Windows' Virtual Keyboard).
2229 * @type {array}
2230 * @default
2231 */
2232 "MOUSE_LEFT_BUTTON" : [1],
2233
2234 /**
2235 * The mouse's middle button (for Windows' Virtual Keyboard).
2236 * @type {array}
2237 * @default
2238 */
2239 "MOUSE_MIDDLE_BUTTON" : [4],
2240
2241 /**
2242 * The mouse's right button (for Windows' Virtual Keyboard).
2243 * @type {array}
2244 * @default
2245 */
2246 "MOUSE_RIGHT_BUTTON" : [2], //For Windows' Virtual keyboard.
2247
2248 /**
2249 * The mouse's X1 button (for Windows' Virtual Keyboard).
2250 * @type {array}
2251 * @default
2252 */
2253 "MOUSE_X1_BUTTON" : [5], //For Windows' Virtual keyboard.
2254
2255 /**
2256 * The mouse's X2 button (for Windows' Virtual Keyboard).
2257 * @type {array}
2258 * @default
2259 */
2260 "MOUSE_X2_BUTTON" : [6], //For Windows' Virtual keyboard.
2261
2262 /**
2263 * The Mute key.
2264 * @type {array}
2265 * @default
2266 */
2267 "MUTE" : //Mute key. Note: 173 is the same code as minus ("-" symbol) in normal keyboard in Firefox:
2268 [
2269 173,
2270 181,
2271 CB_Keyboard.extended.VK.MUTE,
2272 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.MUTE : null, //Same code as ESC key (27).
2273 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MUTE
2274 ],
2275
2276 /**
2277 * The Volume Up key.
2278 * @type {array}
2279 * @default
2280 */
2281 "VOL_UP" : //Volume up key. Note: 175 is same code as "UP" for Wii (Wiimote) D-PAD:
2282 [
2283 175,
2284 183,
2285 CB_Keyboard.extended.VK.VOLUME_UP,
2286 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.VOLUP : null,
2287 CB_Keyboard.extended.SAMSUNG_TV.VOL_UP, //7
2288 CB_Keyboard.extended.SAMSUNG_TV.PANEL_VOL_UP, //203
2289 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.PANEL_VOLUP : null,
2290 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.VOLUME_UP
2291 ],
2292
2293 /**
2294 * The Volume Down key.
2295 * @type {array}
2296 * @default
2297 */
2298 "VOL_DOWN" :
2299 [
2300 174,
2301 182,
2302 CB_Keyboard.extended.VK.VOLUME_DOWN,
2303 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.VOLDOWN : null,
2304 CB_Keyboard.extended.SAMSUNG_TV.VOL_DOWN, //1
2305 CB_Keyboard.extended.SAMSUNG_TV.PANEL_VOL_DOWN, //204
2306 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.PANEL_VOLDOW : null,
2307 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.PANEL_VOLDOWN : null,
2308 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.VOLUME_DOWN
2309 ],
2310
2311 /**
2312 * The Multimedia Forward key.
2313 * @type {array}
2314 * @default
2315 */
2316 "MEDIA_FORWARD" : //Multimedia forward key. Note: 176 is same code as "DOWN" for Wii (Wiimote) D-PAD:
2317 [
2318 176,
2319 228,
2320 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230.FORWARD, //LG Smart TV (Linux 35230).
2321 CB_Keyboard.extended.VK.FAST_FWD, //Smart TV Alliance.
2322 CB_Keyboard.extended.SAMSUNG_TV.FF_, //1078
2323 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.FF : null, //72 (same code as "H" key).
2324 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MEDIA_FORWARD,
2325 CB_Keyboard.extended.AMAZON_FIRE_TV_REMOTE.FF
2326 ],
2327
2328 /**
2329 * The Multimedia Rewind key.
2330 * @type {array}
2331 * @default
2332 */
2333 "MEDIA_REWIND" : //Multimedia rewind key. Note: 177 is same code as "RIGHT" for Wii (Wiimote) D-PAD:
2334 [
2335 177,
2336 227,
2337 CB_Keyboard.extended.VK.REWIND, //Smart TV Alliance.
2338 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230.REWIND, //LG Smart TV (Linux 35230).
2339 CB_Keyboard.extended.SAMSUNG_TV.REWIND_, //1080
2340 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.RW : null, //69 (same code as "E" key).
2341 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.REWIND : null,
2342 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MEDIA_REWIND,
2343 CB_Keyboard.extended.AMAZON_FIRE_TV_REMOTE.RW
2344 ],
2345
2346 /**
2347 * The Multimedia Stop key.
2348 * @type {array}
2349 * @default
2350 */
2351 "MEDIA_STOP" : //Multimedia stop key. Note: 178 is same code as "LEFT" for Wii (Wiimote) D-PAD:
2352 [
2353 178,
2354 CB_Keyboard.extended.VK.STOP, //Smart TV Alliance.
2355 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.STOP : null, //70 (same code as "F" key).
2356 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MEDIA_STOP
2357 ],
2358
2359 /**
2360 * The Multimedia Play/Pause key.
2361 * @type {array}
2362 * @default
2363 */
2364 "MEDIA_PLAY_PAUSE" :
2365 [
2366 179,
2367 CB_Keyboard.extended.VK.PLAY_PAUSE,
2368 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MEDIA_PLAY_PAUSE,
2369 CB_Keyboard.extended.AMAZON_FIRE_TV_REMOTE.PLAY_PAUSE
2370 ],
2371
2372 /**
2373 * The Browser's Back key.
2374 * @type {array}
2375 * @default
2376 */
2377 "BROWSER_BACK" :
2378 [
2379 166,
2380 CB_Keyboard.extended.VK.PREV, //Smart TV Alliance.
2381 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.RETURN : null, //Same code as "X" key (88).
2382 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.PANEL_RETURN : null,
2383 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.RETURN,
2384 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MEDIA_TRACK_PREVIOUS,
2385 CB_Keyboard.extended.VK.BACK //Smart TV Alliance.
2386 ],
2387
2388 /**
2389 * The Browser's Forward key.
2390 * @type {array}
2391 * @default
2392 */
2393 "BROWSER_FORWARD" :
2394 [
2395 167,
2396 CB_Keyboard.extended.VK.NEXT, //Smart TV Alliance.
2397 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MEDIA_TRACK_NEXT
2398 ],
2399
2400 /**
2401 * The Browser's Refresh (Reload) key.
2402 * @type {array}
2403 * @default
2404 */
2405 "BROWSER_REFRESH" : [168],
2406
2407 /**
2408 * The Browser's Stop key.
2409 * @type {array}
2410 * @default
2411 */
2412 "BROWSER_STOP" : [169],
2413
2414 /**
2415 * The Browser's Search key.
2416 * @type {array}
2417 * @default
2418 */
2419 "BROWSER_SEARCH" :
2420 [
2421 170,
2422 CB_Keyboard.extended.VK._allowDuplicateKeyAliases ? CB_Keyboard.extended.VK.SEARCH : null,
2423 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.SEARCH : null,
2424 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.SEARCH
2425 ],
2426
2427 /**
2428 * The Browser's Favorites key.
2429 * @type {array}
2430 * @default
2431 */
2432 "BROWSER_FAVORITES" : [171], //Browser favourites key. Note: 171 is the same code as plus ("+") in normal keyboard in Firefox.
2433
2434 /**
2435 * The Browser's Home key.
2436 * @type {array}
2437 * @default
2438 */
2439 "BROWSER_HOME" :
2440 [
2441 172
2442 ],
2443
2444 /**
2445 * The Mail key.
2446 * @type {array}
2447 * @default
2448 */
2449 "MAIL" : [180],
2450
2451 /**
2452 * The Select Media key.
2453 * @type {array}
2454 * @default
2455 */
2456 "MEDIA_SELECT" : [181], //Select media key. Note: 181 is the same code as mute key.
2457
2458 /**
2459 * The App1 key.
2460 * @type {array}
2461 * @default
2462 */
2463 "APP1" : [182], //App1 key. Note: 182 is the same code as volume down key.
2464
2465 /**
2466 * The App2 key.
2467 * @type {array}
2468 * @default
2469 */
2470 "APP2" : [183], //App2 key. Note: 182 is the same code as volume up key.
2471
2472 /**
2473 * The Attn key.
2474 * @type {array}
2475 * @default
2476 */
2477 "ATTN" : [246],
2478
2479 /**
2480 * The CrSel key.
2481 * @type {array}
2482 * @default
2483 */
2484 "CRSEL" : [247],
2485
2486 /**
2487 * The ExSel key.
2488 * @type {array}
2489 * @default
2490 */
2491 "EXSEL" : [248],
2492
2493 /**
2494 * The EREOF (Erase EOF) key.
2495 * @type {array}
2496 * @default
2497 */
2498 "EREOF" : [249],
2499
2500 /**
2501 * The Play key.
2502 * @type {array}
2503 * @default
2504 */
2505 "PLAY" :
2506 [
2507 250,
2508 CB_Keyboard.extended.LG_SMART_TV_LINUX_35230.PLAY, //LG Smart TV (Linux 35230).
2509 CB_Keyboard.extended.VK.PLAY, //Smart TV Alliance.
2510 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.PLAY : null, //71 (same code as "G" key).
2511 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.MEDIA_PLAY
2512 ],
2513
2514 /**
2515 * The Zoom key.
2516 * @type {array}
2517 * @default
2518 */
2519 "ZOOM" :
2520 [
2521 251,
2522 CB_Keyboard.extended.SAMSUNG_TV.ZOOM1, //1083
2523 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.ZOOM2 : null,
2524 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.ZOOM_IN : null//,
2525 //CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.ZOOM_OUT : null
2526 ],
2527
2528 /**
2529 * The PA1 key.
2530 * @type {array}
2531 * @default
2532 */
2533 "PA1" : [253],
2534
2535 /**
2536 * The Info (Information) key.
2537 * @type {array}
2538 * @default
2539 */
2540 "INFO" :
2541 [
2542 CB_Keyboard.extended.VK.INFO,
2543 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.INFO : null, //31
2544 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.INFO
2545 ],
2546
2547 /**
2548 * The Audio Description key.
2549 * @type {array}
2550 * @default
2551 */
2552 "AUDIODESCRIPTION" :
2553 [
2554 CB_Keyboard.extended.VK._allowDuplicateKeyAliases ? CB_Keyboard.extended.VK.AUDIODESCRIPTION : null,
2555 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.CAPTION : null,
2556 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.CAPTION
2557 ],
2558
2559 /**
2560 * The Subtitle key.
2561 * @type {array}
2562 * @default
2563 */
2564 "SUBTITLE" :
2565 [
2566 CB_Keyboard.extended.VK.SUBTITLE,
2567 CB_Keyboard.extended.SAMSUNG_TV.SUBTITLE, //652
2568 CB_Keyboard.extended.SAMSUNG_TV.SUB_TITLE //1089
2569 ],
2570
2571 /**
2572 * The HD (High Definition) key.
2573 * @type {array}
2574 * @default
2575 */
2576 "HD" :
2577 [
2578 CB_Keyboard.extended.VK._allowDuplicateKeyAliases ? CB_Keyboard.extended.VK.HD : null
2579 ],
2580
2581 /**
2582 * The Red colour button.
2583 * @type {array}
2584 * @default
2585 */
2586 "RED" :
2587 [
2588 CB_Keyboard.extended.VK.RED,
2589 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.RED : null, //Same code as SEPARATOR key (108).
2590 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.RED
2591 ],
2592
2593 /**
2594 * The Green colour button.
2595 * @type {array}
2596 * @default
2597 */
2598 "GREEN" :
2599 [
2600 CB_Keyboard.extended.VK.GREEN,
2601 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.GREEN : null, //Same code as CAPS_LOCK key (20).
2602 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.GREEN
2603 ],
2604
2605 /**
2606 * The Yellow colour button.
2607 * @type {array}
2608 * @default
2609 */
2610 "YELLOW" :
2611 [
2612 CB_Keyboard.extended.VK.YELLOW,
2613 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.YELLOW : null, //21
2614 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.YELLOW
2615 ],
2616
2617 /**
2618 * The Blue colour button.
2619 * @type {array}
2620 * @default
2621 */
2622 "BLUE" :
2623 [
2624 CB_Keyboard.extended.VK.BLUE,
2625 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.BLUE : null, //22
2626 CB_Keyboard.extended.SAMSUNG_TIZEN_TV.BLUE
2627 ],
2628
2629 /**
2630 * The Cyan colour button.
2631 * @type {array}
2632 * @default
2633 */
2634 "CYAN" :
2635 [
2636 CB_Keyboard.extended.SAMSUNG_TV._allowDuplicateKeyAliases ? CB_Keyboard.extended.SAMSUNG_TV.CYAN : null
2637 ]
2638 };
2639 for (CB_Keyboard._x = 0; CB_Keyboard._x &lt; 10; CB_Keyboard._x++) { CB_Keyboard.keys["_" + CB_Keyboard._x] = CB_Keyboard.keys[CB_Keyboard._x]; } //Sets CB_Keyboard.keys._NUMBER = CB_Keyboard.keys[NUMBER] from 0 to 9.
2640 CB_Keyboard._x = undefined;
2641
2642 /**
2643 * Object whose properties are aliases for char codes (each property can contain an array with one or more integers which belong to the char codes).
2644 * @namespace
2645 * @type {Object}
2646 */
2647 CB_Keyboard.chars =
2648 {
2649 /**
2650 * The "0" (zero) character.
2651 * @type {array}
2652 * @default
2653 */
2654 "0" : [48],
2655
2656 /**
2657 * The "1" character.
2658 * @type {array}
2659 * @default
2660 */
2661 "1" : [49],
2662
2663 /**
2664 * The "2" character.
2665 * @type {array}
2666 * @default
2667 */
2668 "2" : [50],
2669
2670 /**
2671 * The "3" character.
2672 * @type {array}
2673 * @default
2674 */
2675 "3" : [51],
2676
2677 /**
2678 * The "4" character.
2679 * @type {array}
2680 * @default
2681 */
2682 "4" : [52],
2683
2684 /**
2685 * The "5" character.
2686 * @type {array}
2687 * @default
2688 */
2689 "5" : [53],
2690
2691 /**
2692 * The "6" character.
2693 * @type {array}
2694 * @default
2695 */
2696 "6" : [54],
2697
2698 /**
2699 * The "7" character.
2700 * @type {array}
2701 * @default
2702 */
2703 "7" : [55],
2704
2705 /**
2706 * The "8" character.
2707 * @type {array}
2708 * @default
2709 */
2710 "8" : [56],
2711
2712 /**
2713 * The "9" character.
2714 * @type {array}
2715 * @default
2716 */
2717 "9" : [57],
2718
2719 /**
2720 * The "+" (plus) character.
2721 * @type {array}
2722 * @default
2723 */
2724 "PLUS" : [43],
2725
2726 /**
2727 * The "-" (minus) character.
2728 * @type {array}
2729 * @default
2730 */
2731 "MINUS" : [45],
2732
2733 /**
2734 * The "*" (asterisk) character.
2735 * @type {array}
2736 * @default
2737 */
2738 "ASTERISK" : [42],
2739
2740 /**
2741 * The "/" (slash) character.
2742 * @type {array}
2743 * @default
2744 */
2745 "SLASH" : [47],
2746
2747 /**
2748 * The "." (dot) character.
2749 * @type {array}
2750 * @default
2751 */
2752 "DOT" : [46],
2753
2754 /**
2755 * The "," (comma) character.
2756 * @type {array}
2757 * @default
2758 */
2759 "COMMA" : [44],
2760
2761 /**
2762 * The "A" letter, upper case (capitalized).
2763 * @type {array}
2764 * @default
2765 */
2766 "A" : [65],
2767
2768 /**
2769 * The "a" letter, lower case.
2770 * @type {array}
2771 * @default
2772 */
2773 "a" : [97],
2774
2775 /**
2776 * The "B" letter, upper case (capitalized).
2777 * @type {array}
2778 * @default
2779 */
2780 "B" : [66],
2781
2782 /**
2783 * The "b" letter, lower case.
2784 * @type {array}
2785 * @default
2786 */
2787 "b" : [98],
2788
2789 /**
2790 * The "C" letter, upper case (capitalized).
2791 * @type {array}
2792 * @default
2793 */
2794 "C" : [67],
2795
2796 /**
2797 * The "c" letter, lower case.
2798 * @type {array}
2799 * @default
2800 */
2801 "c" : [99],
2802
2803 /**
2804 * The "D" letter, upper case (capitalized).
2805 * @type {array}
2806 * @default
2807 */
2808 "D" : [68],
2809
2810 /**
2811 * The "d" letter, lower case.
2812 * @type {array}
2813 * @default
2814 */
2815 "d" : [100],
2816
2817 /**
2818 * The "E" letter, upper case (capitalized).
2819 * @type {array}
2820 * @default
2821 */
2822 "E" : [69],
2823
2824 /**
2825 * The "e" letter, lower case.
2826 * @type {array}
2827 * @default
2828 */
2829 "e" : [101],
2830
2831 /**
2832 * The "F" letter, upper case (capitalized).
2833 * @type {array}
2834 * @default
2835 */
2836 "F" : [70],
2837
2838 /**
2839 * The "f" letter, lower case.
2840 * @type {array}
2841 * @default
2842 */
2843 "f" : [102],
2844
2845 /**
2846 * The "G" letter, upper case (capitalized).
2847 * @type {array}
2848 * @default
2849 */
2850 "G" : [71],
2851
2852 /**
2853 * The "g" letter, lower case.
2854 * @type {array}
2855 * @default
2856 */
2857 "g" : [103],
2858
2859 /**
2860 * The "H" letter, upper case (capitalized).
2861 * @type {array}
2862 * @default
2863 */
2864 "H" : [72],
2865
2866 /**
2867 * The "h" letter, lower case.
2868 * @type {array}
2869 * @default
2870 */
2871 "h" : [104],
2872
2873 /**
2874 * The "I" letter, upper case (capitalized).
2875 * @type {array}
2876 * @default
2877 */
2878 "I" : [73],
2879
2880 /**
2881 * The "i" letter, lower case.
2882 * @type {array}
2883 * @default
2884 */
2885 "i" : [105],
2886
2887 /**
2888 * The "J" letter, upper case (capitalized).
2889 * @type {array}
2890 * @default
2891 */
2892 "J" : [74],
2893
2894 /**
2895 * The "j" letter, lower case.
2896 * @type {array}
2897 * @default
2898 */
2899 "j" : [106],
2900
2901 /**
2902 * The "K" letter, upper case (capitalized).
2903 * @type {array}
2904 * @default
2905 */
2906 "K" : [75],
2907
2908 /**
2909 * The "k" letter, lower case.
2910 * @type {array}
2911 * @default
2912 */
2913 "k" : [107],
2914
2915 /**
2916 * The "L" letter, upper case (capitalized).
2917 * @type {array}
2918 * @default
2919 */
2920 "L" : [76],
2921
2922 /**
2923 * The "l" letter, lower case.
2924 * @type {array}
2925 * @default
2926 */
2927 "l" : [108],
2928
2929 /**
2930 * The "M" letter, upper case (capitalized).
2931 * @type {array}
2932 * @default
2933 */
2934 "M" : [77],
2935
2936 /**
2937 * The "m" letter, lower case.
2938 * @type {array}
2939 * @default
2940 */
2941 "m" : [109],
2942
2943 /**
2944 * The "N" letter, upper case (capitalized).
2945 * @type {array}
2946 * @default
2947 */
2948 "N" : [78],
2949
2950 /**
2951 * The "n" letter, lower case.
2952 * @type {array}
2953 * @default
2954 */
2955 "n" : [110],
2956
2957 /**
2958 * The "O" letter, upper case (capitalized).
2959 * @type {array}
2960 * @default
2961 */
2962 "O" : [79],
2963
2964 /**
2965 * The "o" letter, lower case.
2966 * @type {array}
2967 * @default
2968 */
2969 "o" : [111],
2970
2971 /**
2972 * The "P" letter, upper case (capitalized).
2973 * @type {array}
2974 * @default
2975 */
2976 "P" : [80],
2977
2978 /**
2979 * The "p" letter, lower case.
2980 * @type {array}
2981 * @default
2982 */
2983 "p" : [112],
2984
2985 /**
2986 * The "Q" letter, upper case (capitalized).
2987 * @type {array}
2988 * @default
2989 */
2990 "Q" : [81],
2991
2992 /**
2993 * The "q" letter, lower case.
2994 * @type {array}
2995 * @default
2996 */
2997 "q" : [113],
2998
2999 /**
3000 * The "R" letter, upper case (capitalized).
3001 * @type {array}
3002 * @default
3003 */
3004 "R" : [82],
3005
3006 /**
3007 * The "r" letter, lower case.
3008 * @type {array}
3009 * @default
3010 */
3011 "r" : [114],
3012
3013 /**
3014 * The "S" letter, upper case (capitalized).
3015 * @type {array}
3016 * @default
3017 */
3018 "S" : [83],
3019
3020 /**
3021 * The "s" letter, lower case.
3022 * @type {array}
3023 * @default
3024 */
3025 "s" : [115],
3026
3027 /**
3028 * The "T" letter, upper case (capitalized).
3029 * @type {array}
3030 * @default
3031 */
3032 "T" : [84],
3033
3034 /**
3035 * The "t" letter, lower case.
3036 * @type {array}
3037 * @default
3038 */
3039 "t" : [116],
3040
3041 /**
3042 * The "U" letter, upper case (capitalized).
3043 * @type {array}
3044 * @default
3045 */
3046 "U" : [85],
3047
3048 /**
3049 * The "u" letter, lower case.
3050 * @type {array}
3051 * @default
3052 */
3053 "u" : [117],
3054
3055 /**
3056 * The "V" letter, upper case (capitalized).
3057 * @type {array}
3058 * @default
3059 */
3060 "V" : [86],
3061
3062 /**
3063 * The "v" letter, lower case.
3064 * @type {array}
3065 * @default
3066 */
3067 "v" : [118],
3068
3069 /**
3070 * The "W" letter, upper case (capitalized).
3071 * @type {array}
3072 * @default
3073 */
3074 "W" : [87],
3075
3076 /**
3077 * The "w" letter, lower case.
3078 * @type {array}
3079 * @default
3080 */
3081 "w" : [119],
3082
3083 /**
3084 * The "X" letter, upper case (capitalized).
3085 * @type {array}
3086 * @default
3087 */
3088 "X" : [88],
3089
3090 /**
3091 * The "x" letter, lower case.
3092 * @type {array}
3093 * @default
3094 */
3095 "x" : [120],
3096
3097 /**
3098 * The "Y" letter, upper case (capitalized).
3099 * @type {array}
3100 * @default
3101 */
3102 "Y" : [89],
3103
3104 /**
3105 * The "y" letter, lower case.
3106 * @type {array}
3107 * @default
3108 */
3109 "y" : [121],
3110
3111 /**
3112 * The "Z" letter, upper case (capitalized).
3113 * @type {array}
3114 * @default
3115 */
3116 "Z" : [90],
3117
3118 /**
3119 * The "z" letter, lower case.
3120 * @type {array}
3121 * @default
3122 */
3123 "z" : [122]
3124 };
3125
3126
3127 //Initializes all values:
3128 CB_Keyboard.init = function()
3129 {
3130 if (CB_Keyboard.initialized) { return CB_Keyboard; }
3131
3132 //The object has been initialized:
3133 CB_Keyboard.initialized = true;
3134
3135 //Removes possible key codes duplicated or not really defined (undefined or null):
3136 for (var k in CB_Keyboard.keys)
3137 {
3138 CB_Keyboard.keys[k] = CB_Arrays.removeDuplicated(CB_Keyboard.keys[k], function(v) { return (typeof(v) === "undefined" || v === null || isNaN(v)); });
3139 }
3140
3141 //Every time that focus is lost, it will clear the keysDown array:
3142 ////CB_Events.add(window, "blur", function() { CB_Keyboard.keysDown = {}; }, true, true, false);
3143 try //using catch due some web clients doesn't allow to manipulate the window object of parent iframes:
3144 {
3145 //CB_Events.add(CB_Client.getWindow(), "blur", function() { CB_Keyboard.keysDown = {}; }, true, true, false);
3146 CB_Events.add(CB_Client.getWindow(), "blur", CB_Keyboard.clearKeysDown, true, true, false);
3147 }
3148 catch(E)
3149 {
3150 //CB_Events.add(window, "blur", function() { CB_Keyboard.keysDown = {}; }, true, true, false);
3151 CB_Events.add(window, "blur", CB_Keyboard.clearKeysDown, true, true, false);
3152 }
3153
3154 //Every time that visibility is changed, it will clear the array:
3155 //CB_Screen.onVisibilityChange(function() { CB_Keyboard.keysDown = {}; });
3156
3157 //Sets the default keyboard events:
3158 CB_Keyboard._setDefaultEvents();
3159
3160 return CB_Keyboard;
3161 }
3162
3163
3164 //Sets the default Keyboard events to an object (document by default):
3165 CB_Keyboard._setDefaultEvents = function(target)
3166 {
3167 if (typeof(target) === "undefined" || target === null) { target = document; }
3168
3169 var keyDownCallbackFunction = undefined;
3170 //If we want to prevent the Firefox bug that affects SockJS library (see https://github.com/sockjs/sockjs-client/issues/18):
3171 if (CB_Configuration[CB_BASE_NAME].CB_Net_Sockets_PREVENT_FIREFOX_ESC_BUG) { keyDownCallbackFunction = function(e, keyDown, updateKeysPressed, callbackFunction, keyCode) { if (keyCode === 27) { e.preventDefault(); } }; }
3172
3173 //Sets the event that will check if a key is down:
3174 CB_Events.add(target, "keydown", function(e) { /*e = CB_Events.normalize(e);*/ CB_Keyboard._updateKeysDown(e, true, true, keyDownCallbackFunction); }, true, true, false);
3175
3176 //Prevents F11 key if the web client is compatible with Fullscreen API:
3177 //CB_Events.add(target, "keydown", function(e) { e = CB_Events.normalize(e); CB_Keyboard.preventF11Key(e); }, true, true, false);
3178
3179 //Sets the event that will check if a key is released:
3180 CB_Events.add(target, "keyup", function(e) { /*e = CB_Events.normalize(e);*/ CB_Keyboard._updateKeysDown(e, false, true); }, true, true, false);
3181
3182 //Sets the event that will store the typed string (or clear it):
3183 //CB_Events.add(target, "keydown", function(e) { /*e = CB_Events.normalize(e);*/ CB_Keyboard._updateTypedString(e); }, true, true, false);
3184 CB_Events.add(target, "keypress", function(e) { /*e = CB_Events.normalize(e);*/ CB_Keyboard._updateTypedString(e); }, true, true, false);
3185 }
3186
3187
3188 /**
3189 * Tries to return the given [keyboard event]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent} with some properties normalized (since different clients can use different values) and perhaps some new properties added (in the case they were missing), when possible. The new attached methods and properties may include polyfills, etc. It also calls the {@link CB_Events.normalize} function internally. Some properties added or affected could be [keyCode]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode}, [location]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/location}, [ctrlKey]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/ctrlKey}, [altKey]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/altKey}, [shiftKey]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/shiftKey}, etc.
3190 * @function
3191 * @param {Event} e - [Keyboard event]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent} object. If not provided, it will use the value of "event", "window.event", "Event" or an empty object ("{}").
3192 * @returns {Event} Returns the [keyboard event]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent} object normalized.
3193 * @todo Calculate (if possible) the values for location, ctrlKey, altKey, etc. when added, to simulate the expected behaviour.
3194 */
3195 CB_Keyboard.normalizeEvent = function(e)
3196 {
3197 e = CB_Events.normalize(e);
3198
3199 //If the web client doesn't support it, sets the keyCode property:
3200 if (typeof(e.keyCode) === "undefined" || e.keyCode === null)
3201 {
3202 e.keyCode = CB_Keyboard.getKeyCode(e, true);
3203 }
3204
3205 //Sometimes the property keyCode cannot be overwritten, so we defines this function:
3206 e.getKeyCode = e.getKeyCode || function() { return CB_Keyboard.getKeyCode(this); };
3207
3208 //If the web client doesn't support it, sets the location property:
3209 if (typeof(e.location) === "undefined" || e.location === null)
3210 {
3211 e.location = e.keyLocation ? e.keyLocation : 0;
3212 }
3213
3214 //If the web client doesn't support it, determines whether the CTRL, ALT, SHIFT or META keys are pressed:
3215 if (typeof(e.ctrlKey) === "undefined" || e.ctrlKey === null)
3216 {
3217 e.ctrlKey = CB_Keyboard.isKeyDown(CB_Keyboard.keys.CTRL);
3218 }
3219 if (typeof(e.altKey) === "undefined" || e.altKey === null)
3220 {
3221 e.altKey = CB_Keyboard.isKeyDown(CB_Keyboard.keys.ALT);
3222 }
3223 if (typeof(e.shiftKey) === "undefined" || e.shiftKey === null)
3224 {
3225 e.shiftKey = CB_Keyboard.isKeyDown(CB_Keyboard.keys.SHIFT);
3226 }
3227 /*if (typeof(e.metaKey) === "undefined" || e.metaKey === null)
3228 {
3229 e.metaKey = CB_Keyboard.isKeyDown(CB_Keyboard.keys.META);
3230 }*/
3231
3232 return e;
3233 }
3234
3235
3236
3237 /**
3238 * Returns the key code that is contained in the given [keyboard event]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent}.
3239 * @function
3240 * @param {Event} e - [Keyboard event]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent} object.
3241 * @param {boolean} [avoidNormalize=false] - If it is not set to true, it will call the {@link CB_Events.normalize} function internally before.
3242 * @returns {integer} Returns the key code.
3243 * @todo Have in mind that [keyCode]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode} is deprecated.
3244 */
3245 CB_Keyboard.getKeyCode = function(e, avoidNormalize)
3246 {
3247 if (!avoidNormalize) { e = CB_Events.normalize(e); }
3248 var keyCode = null;
3249 if (e.keyCode) { keyCode = e.keyCode; }
3250 else if (e.key &amp;&amp; typeof(e.key) === "number") { keyCode = e.key; } //For SLCanvas.
3251 else if (window.Event &amp;&amp; e.which) { keyCode = e.which; }
3252 else if (typeof(e.charCode) === "number") { keyCode = e.charCode; }
3253
3254 return keyCode;
3255 }
3256
3257
3258 //Updates array keysDown (this is called whenever a key is down or released):
3259 CB_Keyboard._updateKeysDown = function(e, keyDown, updateKeysPressed, callbackFunction)
3260 {
3261 //By default, updates keys pressed array:
3262 if (typeof(updateKeysPressed) === "undefined" || updateKeysPressed === null) { updateKeysPressed = true; }
3263
3264 //Defines the code of the key pressed:
3265 //e = CB_Events.normalize(e);
3266 e = CB_Keyboard.normalizeEvent(e);
3267 //var keyCode = CB_Keyboard.getKeyCode(e);
3268 //var keyCode = e.keyCode;
3269 var keyCode = e.getKeyCode();
3270
3271 //If the key code is defined:
3272 if (keyCode !== null)
3273 {
3274 //Sets the status of the key (being pressed/down or relased):
3275 CB_Keyboard.keysDown[keyCode] = keyDown;
3276
3277 //If pressed, stores the key code pressed in the keys pressed array:
3278 if (updateKeysPressed &amp;&amp; keyDown)
3279 {
3280 CB_Keyboard._updateKeysPressed(keyCode);
3281 }
3282
3283 if (typeof(callbackFunction) === "function") { callbackFunction(e, keyDown, updateKeysPressed, callbackFunction, keyCode); }
3284 }
3285 }
3286
3287
3288 /**
3289 * Clears (empties totally or partially) the {@link CB_Keyboard.keysDown} object which contains the detected keys pressed or released.
3290 * @function
3291 * @param {boolean} keepPressed - If set to true, it will keep the pressed keys.
3292 */
3293 CB_Keyboard.clearKeysDown = function(keepPressed)
3294 {
3295 if (!keepPressed) { CB_Keyboard.keysDown = {}; }
3296 else
3297 {
3298 var keysDown = {};
3299 for (var keyCode in CB_Keyboard.keysDown)
3300 {
3301 if (CB_Keyboard.keysDown[keyCode]) { keysDown[keyCode] = true; }
3302 }
3303 CB_Keyboard.keysDown = keysDown;
3304 }
3305 }
3306
3307
3308 /**
3309 * Returns the {@link CB_Keyboard.keysDown} object which contains the detected keys pressed or released.
3310 * @function
3311 * @returns {Object} Returns the {@link CB_Keyboard.keysDown} object.
3312 */
3313 CB_Keyboard.getKeysDown = function()
3314 {
3315 return CB_Keyboard.keysDown;
3316 }
3317
3318
3319 /**
3320 * Returns whether the given key codes are being pressed (any of them or all at the same time, depending on the "allPressed" parameter).
3321 * @function
3322 * @param {integer|array|Object} keyCodes - An integer with the key code or a numeric array with the key codes that we want to check. It can also be an array of arrays, being each element a numeric array with the key codes that we want to check. Although not recommended (for performance purposes), this parameter can also support an object whose indexes are the keycodes (it will be converted to a numeric array internally).
3323 * @param {boolean} [allPressed=false] - If set true, the function will only return true in the case that all given key codes are currently being pressed. Otherwise, if set to false, the function will return true in the case that any of the given key codes is currently being pressed. When the "keyCodes" is an array of arrays with key codes, it will be considered that all keys are being pressed if each single array (all of them) has at least one of its key codes pressed.
3324 * @returns {boolean} If "allPressed" parameter is set to true, returns true in the case that all given key codes are currently being pressed. If "allPressed" parameter is set to false, returns true in the case that any of the given key codes is currently being pressed. In all other cases, it returns false.
3325 */
3326 CB_Keyboard.isKeyDown = function(keyCodes, allPressed)
3327 {
3328 var isDown = false;
3329
3330 //If the parameter given is not an array, we force it to be an array:
3331 if (!isNaN(keyCodes)) { keyCodes = [parseInt(keyCodes)]; } //If a number has been received, it will be the first and unique element of the array. Note that parseInt could return a NaN.
3332 if (!CB_isArray(keyCodes)) //If we have received an object which is not an array:
3333 {
3334 var keyCodesArray = [];
3335 for (var keyCode in keyCodes)
3336 {
3337 if (!isNaN(keyCode)) { keyCodesArray[keyCodesArray.length] = parseInt(keyCode); } //Only stores
3338 }
3339 keyCodes = keyCodesArray;
3340 }
3341
3342 var keysDown = CB_Keyboard.getKeysDown();
3343 var keyCodesLength = keyCodes.length;
3344 for (var x = 0; x &lt; keyCodesLength; x++)
3345 {
3346 //If the code given is a number, it exists in the keysDown array and it is being pressed:
3347 if (typeof(keyCodes[x]) !== "undefined" &amp;&amp; keyCodes[x] !== null &amp;&amp; !isNaN(keyCodes[x]) &amp;&amp; typeof(keysDown[keyCodes[x]]) !== "undefined" &amp;&amp; keysDown[keyCodes[x]])
3348 {
3349 isDown = true;
3350 //if (!allPressed) { break; }
3351 }
3352 //...otherwise, if the value belongs to an array, calls itself recursively:
3353 else if (CB_isArray(keyCodes[x]))
3354 {
3355 isDown = CB_Keyboard.isKeyDown(keyCodes[x], false); //If any key is pressed is enough.
3356 }
3357 //...otherwise, if the user wanted to know whether all given keys were pressed:
3358 else if (allPressed)
3359 {
3360 //Not all given keys are pressed so it exits:
3361 isDown = false;
3362 //break;
3363 }
3364
3365 if (allPressed &amp;&amp; !isDown) { break; }
3366 else if (!allPressed &amp;&amp; isDown) { break; } //If the user does not want to know whether all are keys given are pressed, with one is enough so it exits.
3367 }
3368
3369 return isDown;
3370 }
3371
3372
3373 //Updates the keys pressed array:
3374 CB_Keyboard._updateKeysPressed = function(keyCode)
3375 {
3376 //Clears the timeout that clears the keys pressed:
3377 clearTimeout(CB_Keyboard._keysPressedExpirationTimeout);
3378
3379 //Updates the keys pressed and its codes:
3380 CB_Keyboard.keysPressed[CB_Keyboard.keysPressed.length] = keyCode;
3381
3382 //Sets the timeout that clears the array after some milliseconds:
3383 CB_Keyboard._keysPressedExpirationTimeout =
3384 setTimeout
3385 (
3386 function()
3387 {
3388 CB_Keyboard.keysPressed = [];
3389 },
3390 CB_Keyboard._keysPressedExpiration
3391 );
3392
3393 }
3394
3395
3396 /**
3397 * Clears (empties totally or partially) the {@link CB_Keyboard.keysPressed} array which contains the key codes pressed recently.
3398 * @function
3399 * @param {boolean} keepPressed - If set to true, it will keep the pressed keys (taken from the {@link CB_Keyboard.keysDown} object).
3400 */
3401 CB_Keyboard.clearKeysPressed = function(keepPressed)
3402 {
3403 //Clears the timeout that clears the keys pressed:
3404 clearTimeout(CB_Keyboard._keysPressedExpirationTimeout);
3405
3406 if (!keepPressed) { CB_Keyboard.keysPressed = []; }
3407 else
3408 {
3409 var keysPressed = [];
3410 for (var keyCode in CB_Keyboard.keysDown)
3411 {
3412 if (CB_Keyboard.keysDown[keyCode]) { keysPressed[keysPressed.length] = keyCode; }
3413 }
3414 CB_Keyboard.keysPressed = keysPressed;
3415 }
3416 }
3417
3418
3419 /**
3420 * Returns the {@link CB_Keyboard.keysPressed} array which contains the key codes pressed recently (it will be cleared after the chosen milliseconds set with the {@link CB_Keyboard.setKeysPressedExpiration} function).
3421 * @function
3422 * @returns {array} Returns the {@link CB_Keyboard.keysPressed} array.
3423 */
3424 CB_Keyboard.getKeysPressed = function()
3425 {
3426 return CB_Keyboard.keysPressed;
3427 }
3428
3429
3430 /**
3431 * Sets the milliseconds after which the {@link CB_Keyboard.keysPressed} array is always cleared (emptied). The time always starts counting from zero when a key is pressed ([onKeyDown]{@link https://developer.mozilla.org/en-US/docs/Web/Events/keydown} event is fired).
3432 * @function
3433 * @param {integer} keysPressedExpiration - An integer greater than 0 (zero) representing the milliseconds after which we desire that the {@link CB_Keyboard.keysPressed} array is cleared (emptied), if no key is pressed during this time.
3434 * @returns {boolean} Returns true if the given time could be applied or false otherwise.
3435 */
3436 CB_Keyboard.setKeysPressedExpiration = function(keysPressedExpiration)
3437 {
3438 //Only allows numbers greater than zero:
3439 if (typeof(keysPressedExpiration) !== "undefined" &amp;&amp; keysPressedExpiration !== null &amp;&amp; !isNaN(keysPressedExpiration) &amp;&amp; keysPressedExpiration > 0)
3440 {
3441 CB_Keyboard._keysPressedExpiration = parseInt(keysPressedExpiration);
3442 return true;
3443 }
3444 return false;
3445 }
3446
3447
3448 /**
3449 * Returns the milliseconds after which the {@link CB_Keyboard.keysPressed} array is always cleared (emptied). The time always starts counting from zero again when a key is pressed ([onKeyDown]{@link https://developer.mozilla.org/en-US/docs/Web/Events/keydown} event is fired).
3450 To define this amount of time, the {@link CB_Keyboard.setKeysPressedExpiration} method must be used.
3451 * @function
3452 * @returns {integer} Returns the milliseconds of expiration defined for the {@link CB_Keyboard.keysPressed} array.
3453 */
3454 CB_Keyboard.getKeysPressedExpiration = function()
3455 {
3456 return CB_Keyboard._keysPressedExpiration;
3457 }
3458
3459
3460 //Updates the string typed (CAUTION: using String.fromCharCode(keyCode) internally as keyCode was a char code and it is not!):
3461 CB_Keyboard._updateTypedString = function(e)
3462 {
3463 //Clears the timeout that clears the typed string:
3464 clearTimeout(CB_Keyboard._typedStringExpirationTimeout);
3465
3466 //Defines the code of the key pressed:
3467 //e = CB_Events.normalize(e);
3468 e = CB_Keyboard.normalizeEvent(e);
3469
3470 //var keyCode = CB_Keyboard.getKeyCode(e);
3471 var keyCode = e.getKeyCode();
3472 //var keyCode = e.keyCode;
3473
3474 if (keyCode !== null)
3475 {
3476 //Gets the character typed:
3477 var characterTyped = String.fromCharCode(keyCode); //CAUTION: using keyCode as it was a char code and it is not!
3478 //var charCode = keyCode - 48 * Math.floor(keyCode / 48);
3479 //var characterTyped = String.fromCharCode((keyCode > 96) ? keyCode : charCode);
3480
3481 //Updates the string typed and its codes:
3482 CB_Keyboard.typedStringCodes[CB_Keyboard.typedStringCodes.length] = keyCode;
3483 CB_Keyboard.typedString += characterTyped;
3484
3485 //Easter egg:
3486 if (CB_Keyboard.typedString.substring(CB_Keyboard.typedString.length - 11) === "CrossBrowdy")
3487 {
3488 setTimeout
3489 (
3490 function()
3491 {
3492 alert("Congratulations, you have found a CrossBrowdy Eastern egg!!! ;)");
3493 CB_Keyboard.typedStringCodes = []; //Clears the typed string codes.
3494 CB_Keyboard.typedString = ""; //Clears the typed string.
3495 },
3496 100
3497 ); //Executes the function after some milliseconds allowing others get the typed string updated.
3498 }
3499
3500 //Sets the timeout that clears the string after some milliseconds:
3501 CB_Keyboard._typedStringExpirationTimeout =
3502 setTimeout
3503 (
3504 function()
3505 {
3506 CB_Keyboard.typedStringCodes = [];
3507 CB_Keyboard.typedString = "";
3508 },
3509 CB_Keyboard._typedStringExpiration
3510 );
3511 }
3512 }
3513
3514
3515 /**
3516 * Clears (empties totally or partially) the {@link CB_Keyboard.typedString} string and the {@link CB_Keyboard.typedStringCodes} array.
3517 * @function
3518 * @param {boolean} keepPressed - If set to true, it will keep the values belonging to the currently-pressed keys (taken from the {@link CB_Keyboard.keysDown} object).
3519 */
3520 CB_Keyboard.clearTypedString = function(keepPressed) //CAUTION: using String.fromCharCode(keyCode) internally as keyCode was a char code and it is not!
3521 {
3522 //Clears the timeout that clears the typed string:
3523 clearTimeout(CB_Keyboard._typedStringExpirationTimeout);
3524
3525 if (!keepPressed)
3526 {
3527 CB_Keyboard.typedStringCodes = [];
3528 CB_Keyboard.typedString = "";
3529 }
3530 else
3531 {
3532 var typedStringCodes = [];
3533 var typedString = "";
3534 var characterTyped = null;
3535 var keyCode = null;
3536
3537 var typedStringCodesLength = CB_Keyboard.typedStringCodes.length;
3538 for (var x = 0; x &lt; typedStringCodesLength; x++)
3539 {
3540 keyCode = CB_Keyboard.typedStringCodes[x];
3541 if (CB_Keyboard.keysDown[keyCode])
3542 {
3543 typedStringCodes[typedStringCodes.length] = keyCode;
3544 characterTyped = String.fromCharCode(keyCode); //CAUTION: using keyCode as it was a char code and it is not!
3545 typedString += characterTyped;
3546 }
3547 }
3548
3549 /*
3550 for (var keyCode in CB_Keyboard.keysDown)
3551 {
3552 if (CB_Keyboard.keysDown[keyCode])
3553 {
3554 typedStringCodes[typedStringCodes.length] = keyCode;
3555 characterTyped = String.fromCharCode(keyCode); //CAUTION: using keyCode as it was a char code and it is not!
3556 typedString += characterTyped;
3557 }
3558 }
3559 */
3560 CB_Keyboard.typedStringCodes = typedStringCodes;
3561 CB_Keyboard.typedString = typedString;
3562 }
3563 }
3564
3565
3566 /**
3567 * Returns the {@link CB_Keyboard.typedString} string which contains the string typed recently (it will be cleared after the chosen milliseconds set with the {@link CB_Keyboard.setTypedStringExpiration} function).
3568 * @function
3569 * @returns {string} Returns the {@link CB_Keyboard.typedString} string.
3570 */
3571 CB_Keyboard.getTypedString = function()
3572 {
3573 return CB_Keyboard.typedString;
3574 }
3575
3576
3577 /**
3578 * Returns the {@link CB_Keyboard.typedStringCodes} array which contains the key codes pressed that belongs to the string typed recently (it will be cleared after the chosen milliseconds set with the {@link CB_Keyboard.setTypedStringExpiration} function).
3579 * @function
3580 * @returns {array} Returns the {@link CB_Keyboard.typedStringCodes} array.
3581 */
3582 CB_Keyboard.getTypedStringCodes = function()
3583 {
3584 return CB_Keyboard.typedStringCodes;
3585 }
3586
3587
3588 /**
3589 * Sets the milliseconds after which the {@link CB_Keyboard.typedString} string and the {@link CB_Keyboard.typedStringCodes} array are always cleared (emptied). The time always starts counting from zero when a key is pressed ([onKeyPress]{@link https://developer.mozilla.org/en-US/docs/Web/Events/keypress} event is fired).
3590 * @function
3591 * @param {integer} keysPressedExpiration - An integer greater than 0 (zero) representing the milliseconds after which we desire that the {@link CB_Keyboard.typedString} string and the {@link CB_Keyboard.typedStringCodes} array are cleared (emptied), if no key is pressed during this time.
3592 * @returns {boolean} Returns true if the given time could be applied or false otherwise.
3593 */
3594 CB_Keyboard.setTypedStringExpiration = function(typedStringExpiration)
3595 {
3596 //Only allows numbers greater than zero:
3597 if (typeof(typedStringExpiration) !== "undefined" &amp;&amp; typedStringExpiration !== null &amp;&amp; !isNaN(typedStringExpiration) &amp;&amp; typedStringExpiration > 0)
3598 {
3599 CB_Keyboard._typedStringExpiration = parseInt(typedStringExpiration);
3600 return true;
3601 }
3602 return false;
3603 }
3604
3605
3606 /**
3607 * Returns the milliseconds after which the {@link CB_Keyboard.typedString} string and the {@link CB_Keyboard.typedStringCodes} array are always cleared (emptied). The time always starts counting from zero again when a key is pressed ([onKeyPress]{@link https://developer.mozilla.org/en-US/docs/Web/Events/keypress} event is fired).
3608 To define this amount of time, the {@link CB_Keyboard.setTypedStringExpiration} method must be used.
3609 * @function
3610 * @returns {integer} Returns the milliseconds of expiration defined for the {@link CB_Keyboard.typedString} string and the {@link CB_Keyboard.typedStringCodes} array.
3611 */
3612 CB_Keyboard.getTypedStringExpiration = function()
3613 {
3614 return CB_Keyboard._typedStringExpiration;
3615 }
3616
3617
3618 /**
3619 * Tries to prevent the default behaviour that would produce the "F11" key of a given [keyboard event]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent} when the client is compatible with the HTML5 Fullscreen API and uses it to toggle (enable or disable) the fullscreen mode. It calls the {@link CB_Keyboard.normalizeEvent} function internally.
3620 * @function
3621 * @param {Event} e - [Keyboard event]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent} object.
3622 */
3623 CB_Keyboard.preventF11Key = function(e)
3624 {
3625 //e = CB_Events.normalize(e);
3626 e = CB_Keyboard.normalizeEvent(e);
3627 //var keyCode = CB_Keyboard.getKeyCode(e);
3628 //var keyCode = e.keyCode;
3629 var keyCode = e.getKeyCode();
3630
3631 //If the F11 key has been pressed:
3632 if (CB_Keyboard.keys.F11.indexOf(keyCode) !== -1)
3633 {
3634 //If it's compatible with the FullScreen API, Prevents the use of F11 key and uses FullScreen API instead:
3635 if (CB_Screen.isFullScreenAPICompatible() &amp;&amp; typeof(e.preventDefault) !== "undefined" &amp;&amp; e.preventDefault !== null)
3636 {
3637 //If it's in fullscreen mode, we cancel it:
3638 if (CB_Screen.isFullScreen())
3639 {
3640
3641 //setTimeout(function(){CB_Screen.setFullScreen(false);},100);
3642 CB_Screen.setFullScreen(false);
3643 }
3644 //...otherwise, we request fullscreen mode:
3645 else
3646 {
3647 //setTimeout(function(){CB_Screen.setFullScreen();},100);
3648 CB_Screen.setFullScreen();
3649 }
3650 e.preventDefault();
3651 }
3652 }
3653 }
3654
3655
3656 /**
3657 * Callback that is called before loading a file and should return true if we want to load the file or false otherwise.
3658 * @memberof CB_Keyboard
3659 * @callback CB_Keyboard.EVENT_CALLBACK
3660 * @param {Event} e - [Keyboard event]{@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent} object.
3661 * @param {integer} keyCode - Key code which fired the event.
3662 */
3663
3664
3665 /**
3666 * Sets a function to execute when a key is pressed ([onKeyPress]{@link https://developer.mozilla.org/en-US/docs/Web/Events/keypress} event) or removes it.
3667 * @function
3668 * @param {CB_Keyboard.EVENT_CALLBACK|null} callbackFunction - The function (event listener) that we want to execute when the event is fired. The first parameter received for this function will be the event object (already normalized by the {@link CB_Keyboard.normalizeEvent} function) and the second one will be the key code associated. If a null value is used, the event will be removed.
3669 * @param {boolean} [keepOldFunction=true] - Defines whether we want to keep any possible previous event listener for the same target and event name or not.
3670 * @param {boolean} [useCapture=false] - Defines whether the event we want to add will use capture or not. This parameter will be effective only if the current client supports the [addEventListener]{@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener} method and will be used as its third parameter.
3671 * @param {Object} [target=document] - The target where we want to attach the event listener.
3672 */
3673 CB_Keyboard.onKeyPress = function(callbackFunction, keepOldFunction, useCapture, target)
3674 {
3675 return CB_Keyboard._setEvent("keypress", callbackFunction, keepOldFunction, useCapture, target);
3676 }
3677
3678
3679 /**
3680 * Sets a function to execute when a key is down ([onKeyDown]{@link https://developer.mozilla.org/en-US/docs/Web/Events/keydown} event) or removes it.
3681 * @function
3682 * @param {CB_Keyboard.EVENT_CALLBACK|null} callbackFunction - The function (event listener) that we want to execute when the event is fired. The first parameter received for this function will be the event object (already normalized by the {@link CB_Keyboard.normalizeEvent} function) and the second one will be the key code associated. If a null value is used, the event will be removed.
3683 * @param {boolean} [keepOldFunction=true] - Defines whether we want to keep any possible previous event listener for the same target and event name or not.
3684 * @param {boolean} [useCapture=false] - Defines whether the event we want to add will use capture or not. This parameter will be effective only if the current client supports the [addEventListener]{@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener} method and will be used as its third parameter.
3685 * @param {Object} [target=document] - The target where we want to attach the event listener.
3686 */
3687 CB_Keyboard.onKeyDown = function(callbackFunction, keepOldFunction, useCapture, target)
3688 {
3689 return CB_Keyboard._setEvent("keydown", callbackFunction, keepOldFunction, useCapture, target);
3690 }
3691
3692
3693 /**
3694 * Sets a function to execute when a key is released ([onKeyUp]{@link https://developer.mozilla.org/en-US/docs/Web/Events/keyup} event) or removes it.
3695 * @function
3696 * @param {CB_Keyboard.EVENT_CALLBACK|null} callbackFunction - The function (event listener) that we want to execute when the event is fired. The first parameter received for this function will be the event object (already normalized by the {@link CB_Keyboard.normalizeEvent} function) and the second one will be the key code associated. If a null value is used, the event will be removed.
3697 * @param {boolean} [keepOldFunction=true] - Defines whether we want to keep any possible previous event listener for the same target and event name or not.
3698 * @param {boolean} [useCapture=false] - Defines whether the event we want to add will use capture or not. This parameter will be effective only if the current client supports the [addEventListener]{@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener} method and will be used as its third parameter.
3699 * @param {Object} [target=document] - The target where we want to attach the event listener.
3700 */
3701 CB_Keyboard.onKeyUp = function(callbackFunction, keepOldFunction, useCapture, target)
3702 {
3703 return CB_Keyboard._setEvent("keyup", callbackFunction, keepOldFunction, useCapture, target);
3704 }
3705
3706
3707 //Sets a function to execute when a keyboard event happens:
3708 CB_Keyboard._setEvent = function(eventName, eventFunction, keepOldFunction, useCapture, target)
3709 {
3710 //If they are not set, use default values for optional parameters:
3711 if (typeof(keepOldFunction) === "undefined" || keepOldFunction === null) { keepOldFunction = true; } //If not set, it keeps old function by default.
3712 if (typeof(target) === "undefined" || target === null) { target = document; }
3713
3714 //If a function has been sent:
3715 if (typeof(eventFunction) === "function")
3716 {
3717 //If able, adds the function given to the event:
3718 //eventFunctionHolder = functionToAdd;
3719 CB_Events.add
3720 (
3721 target,
3722 eventName,
3723 function(e)
3724 {
3725 //e = CB_Events.normalize(e);
3726 e = CB_Keyboard.normalizeEvent(e);
3727 if (eventName === "keydown" || eventName === "keyup")
3728 {
3729 CB_Keyboard._updateKeysDown(e, (eventName === "keydown"), false); //Updates keys down.
3730 }
3731 //var keyCode = CB_Keyboard.getKeyCode(e);
3732 if (typeof(eventFunction) === "function")
3733 {
3734 //return eventFunction(e, e.keyCode);
3735 return eventFunction(e, e.getKeyCode());
3736 }
3737 return true;
3738 },
3739 useCapture,
3740 keepOldFunction,
3741 true
3742 );
3743 }
3744 //...but if the function given is null, it will cancel the event:
3745 else if (eventFunction === null)// &amp;&amp; eventFunctionHolder !== null)
3746 {
3747 //CB_Events.remove(target, eventName, eventFunctionHolder, useCapture);
3748 CB_Events.removeByName(target, eventName);
3749 //eventFunctionHolder = null;
3750 }
3751 }
3752
3753} //End of the static class CB_Keyboard.</pre>
3754 </article>
3755</section>
3756
3757
3758
3759
3760
3761 </div>
3762 </div>
3763
3764 <div class="clearfix"></div>
3765
3766
3767
3768</div>
3769</div>
3770
3771
3772 <div class="modal fade" id="searchResults">
3773 <div class="modal-dialog">
3774 <div class="modal-content">
3775 <div class="modal-header">
3776 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
3777 <h4 class="modal-title">Search results</h4>
3778 </div>
3779 <div class="modal-body"></div>
3780 <div class="modal-footer">
3781 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
3782 </div>
3783 </div><!-- /.modal-content -->
3784 </div><!-- /.modal-dialog -->
3785 </div>
3786
3787
3788<footer>
3789
3790
3791 <span class="copyright">
3792 <a href="printable/" target="_blank">See a more printer-friendly version</a><hr /><span style="color:#000000">© <address style="display:inline; font-style:normal;"><a href="https://crossbrowdy.com/" target="_blank">CrossBrowdy</a> API documentation</address> by <a href="https://joanalbamaldonado.com/" target="_blank">Joan Alba Maldonado</a> - <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International</a><br />DocStrap Copyright © 2012-2015 The contributors to the JSDoc3 and DocStrap projects.</span>
3793 </span>
3794
3795<span class="jsdoc-message">
3796 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
3797
3798 on Mon Feb 3rd 2020
3799
3800 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
3801</span>
3802</footer>
3803
3804<script src="scripts/docstrap.lib.js"></script>
3805<script src="scripts/toc.js"></script>
3806
3807 <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
3808
3809
3810<script>
3811$( function () {
3812 $( "[id*='$']" ).each( function () {
3813 var $this = $( this );
3814
3815 $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
3816 } );
3817
3818 $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
3819 var $this = $( this );
3820
3821 var example = $this.find( "code" );
3822 exampleText = example.html();
3823 var lang = /{@lang (.*?)}/.exec( exampleText );
3824 if ( lang && lang[1] ) {
3825 exampleText = exampleText.replace( lang[0], "" );
3826 example.html( exampleText );
3827 lang = lang[1];
3828 } else {
3829 var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
3830 lang = langClassMatch ? langClassMatch[1] : "javascript";
3831 }
3832
3833 if ( lang ) {
3834
3835 $this
3836 .addClass( "sunlight-highlight-" + lang )
3837 .addClass( "linenums" )
3838 .html( example.html() );
3839
3840 }
3841 } );
3842
3843 Sunlight.highlightAll( {
3844 lineNumbers : true,
3845 showMenu : true,
3846 enableDoclinks : true
3847 } );
3848
3849 $.catchAnchorLinks( {
3850 navbarOffset: 10
3851 } );
3852 $( "#toc" ).toc( {
3853 anchorName : function ( i, heading, prefix ) {
3854 return $( heading ).attr( "id" ) || ( prefix + i );
3855 },
3856 selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
3857 showAndHide : false,
3858 smoothScrolling: true
3859 } );
3860
3861 $( "#main span[id^='toc']" ).addClass( "toc-shim" );
3862 $( '.dropdown-toggle' ).dropdown();
3863
3864 $( "table" ).each( function () {
3865 var $this = $( this );
3866 $this.addClass('table');
3867 } );
3868
3869} );
3870</script>
3871
3872
3873
3874<!--Navigation and Symbol Display-->
3875
3876<script>
3877 $( function () {
3878 $( '#main' ).localScroll( {
3879 offset : { top : 60 } //offset by the height of your header (give or take a few px, see what works for you)
3880 } );
3881 $( "dt.name" ).each( function () {
3882 var $this = $( this ).find("h4");
3883 var icon = $( "<i/>" ).addClass( "icon-plus-sign" ).addClass( "pull-right" ).addClass( "icon-white" );
3884 var dt = $(this);
3885 var children = dt.next( "dd" );
3886
3887 dt.prepend( icon ).css( {cursor : "pointer"} );
3888 dt.addClass( "member-collapsed" ).addClass( "member" );
3889
3890
3891 children.hide();
3892
3893 dt.children().on( "click", function () {
3894 children = dt.next( "dd" );
3895 children.slideToggle( "fast", function () {
3896
3897 if ( children.is( ":visible" ) ) {
3898 icon.addClass( "icon-minus-sign" ).removeClass( "icon-plus-sign" ).removeClass( "icon-white" );
3899 dt.addClass( "member-open" ).animate( "member-collapsed" );
3900 } else {
3901 icon.addClass( "icon-plus-sign" ).removeClass( "icon-minus-sign" ).addClass( "icon-white" );
3902 dt.addClass( "member-collapsed" ).removeClass( "member-open" );
3903 }
3904 } );
3905 } );
3906
3907 } );
3908 } );
3909</script>
3910
3911
3912<!--Google Analytics-->
3913
3914
3915
3916 <script type="text/javascript">
3917 $(document).ready(function() {
3918 SearcherDisplay.init();
3919 });
3920 </script>
3921
3922
3923</body>
3924</html>