-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex-source.txt
913 lines (764 loc) · 51.1 KB
/
index-source.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
<h1>UI Events KeyboardEvent key Values</h1>
<pre class="metadata">
Shortname: uievents-key
Level:
Group: webapps
Status: WD
TR: http://www.w3.org/TR/uievents-key/
ED: https://w3c.github.io/uievents-key/
Repository: w3c/uievents-key
Previous Version:
http://www.w3.org/TR/2015/WD-uievents-key-20151215/
!Implementation Report: <a href="https://w3c.github.io/uievents-key/impl-report.html">https://w3c.github.io/uievents-key/impl-report.html</a>
Editor: Gary Kacmarcik, Google, garykac@google.com
Editor: Travis Leithead, Invited Expert, travisleithead@hotmail.com
Abstract:
This specification defines the [=key attribute values=] that must be used for
{{KeyboardEvent}}'s {{KeyboardEvent/key}} attribute, which is defined as part
of the UI Events Specification [[!UIEvents]].
</pre>
<pre class="biblio">
{
"AndroidKeycode": {
"title": "Android KeyEvent",
"href": "http://developer.android.com/reference/android/view/KeyEvent.html",
"publisher": "Google"
},
"DASE": {
"title": "ATSC A/100-2, DTV Application Software Environment Level 1 (DASE-1) Part 2: Declarative Applications and Environment",
"href": "http://atsc.org/standard/a100-dtv-application-software-environment-level-1-dase-1/",
"publisher": "Advanced Television Systems Committee",
"date": "09 March 2003"
},
"ISO9995-1": {
"href": "http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=51645",
"title": "ISO/IEC 9995-1:2009 Information technology -- Keyboard layouts for text and office systems -- Part 1: General principles governing keyboard layouts",
"publisher": "ISO"
},
"KeyEventJava": {
"title": "Java™ Platform, Standard Edition 6 API Specification, Class java.awt.events.KeyEvent",
"href": "http://docs.oracle.com/javase/6/docs/api/java/awt/event/KeyEvent.html",
"publisher": "Oracle"
},
"KeysNet": {
"title": ".NET Framework 4.5 Class Library, Keys Enumeration",
"href": "http://msdn.microsoft.com/en-us/library/system.windows.forms.keys.aspx",
"publisher": "Microsoft"
},
"OCAP": {
"title": "Open Cable Application Platform 1.1.3",
"href": "https://apps.cablelabs.com/specification/opencable-application-platform-ocap/",
"publisher": "Cable Television Laboratories, Inc.",
"date": "03 June 2010"
},
"WEB4CE": {
"title": "ANSI/CTA-2014-B, Web-based Protocol and Framework for Remote User Interface on UPnP Networks and the Internet (Web4CE)",
"href": "https://standards.cta.tech/apps/group_public/project/details.php?project_id=220",
"publisher": "Consumer Technology Association",
"date": "January 2011"
},
"WmAppCommand": {
"title": "MSDN WM_APPCOMMAND message",
"href": "https://msdn.microsoft.com/en-us/library/windows/desktop/ms646275(v=vs.85).aspx",
"publisher": "Microsoft"
}
}
</pre>
<pre class="anchors">
urlPrefix: http://www.w3.org/TR/uievents/#interface-; type: interface; spec: uievents;
text: KeyboardEvent
urlPrefix: http://www.w3.org/TR/uievents/#dom-keyboardevent-; type: attribute; for: KeyboardEvent; spec: uievents;
text: key
text: code
text: location
urlPrefix: http://www.w3.org/TR/uievents/#; type: dfn; spec: uievents;
text: compositionupdate
text: dead key
url: http://www.w3.org/TR/uievents/#key-legends; type: dfn; spec: uievents;
text: key cap
url: http://www.w3.org/TR/uievents-key/#key-value-tables; type: dfn; spec: uievents-code;
text: key code attribute value
</pre>
<pre class="include">
path: stylesheet-extra.include
</pre>
<h2 id="introduction">Introduction</h2>
This document specifies the set of valid [=key attribute values=] that MUST be used
in the {{KeyboardEvent}}'s {{KeyboardEvent/key}} attribute to encode the key's
meaning. Note that the {{KeyboardEvent/key}} value for a particular key will differ
based on the user's current locale setting. For a value that is based only on the key's
physical location on the keyboard and does not vary based on locale, see
{{KeyboardEvent/code}} described in [[!UIEvents-Code]].
<h3 id="style-conventions">Stylistic Conventions</h3>
This specification uses the following conventions:
* The <em>[=key cap=]</em> printed on a key is shown as
KEYCAP{↓}, KEYCAP{=} or KEYCAP{Q}. This is used to refer to a
key from the user's perspective without regard for the
{{KeyboardEvent/key}} and {{KeyboardEvent/code}} values in the
generated {{KeyboardEvent}}.
* Glyphs representing character are shown as: GLYPH{a}, GLYPH{é},
GLYPH{ر}, GLYPH{字}.
* Unicode [[!Unicode]] code points are shown as: UNI{U+003D}.
* Valid [=key attribute values=] (i.e., the value of
a {{KeyboardEvent}}'s {{KeyboardEvent/key}} attribute) are shown as:
KEY{ArrowDown}, KEY_NOLINK{=}, KEY_NOLINK{q} or KEY_NOLINK{Q}.
* Valid [=key code attribute values=] (i.e., the
value of a {{KeyboardEvent}}'s {{KeyboardEvent/code}} attribute) are shown as:
CODE{ArrowDown}, CODE{Equal} or CODE{KeyQ}.
<h2 id="key-attr-values">Keyboard Event {{KeyboardEvent/key}} Attribute Values</h2>
A <dfn>key attribute value</dfn> is defined as being a <code>DOMString</code> that
contains one of the following:
* A [=key string=] that corresponds to
the character typed by the user, taking into account the user's current locale
setting, modifier state, and any system-level keyboard mapping overrides that are
in effect.
* A [=named key attribute value=], as defined by the tables in this document.
A [=key attribute value=] MUST always contain a value that falls into one of these
two categories (even if the value is KEY{Unidentified}).
It is acceptable for multiple keys on a keyboard to generate the same
[=key attribute value=]. For example, on an EN-US keyboard layout, the keys on the
numeric keypad (e.g., the keypad KEYCAP{1} key) will generate the same
[=key attribute values=] as their non-keypad counterparts (e.g., the KEYCAP{1} key
in the main part of the keyboard). The {{KeyboardEvent}}'s
{{KeyboardEvent/location}} attribute can be used to determine if a key
originated from the numeric keypad.
<h3 id="keys-unicode">Unicode Values</h3>
Almost every Unicode character can be used as a valid [=key attribute value=], but
there is a small set of Unicode characters which MUST NOT be used.
We introduce the concept of a [=key string=] to identify the set of
Unicode strings that are appropriate for use as a [=key attribute value=].
A <dfn>key string</dfn> is a string containing a 0 or 1 [=non-control characters=]
("base" characters) followed by 0 or more [=combining characters=]. The string MUST
be in Normalized Form C (NFC) as described in [[!UAX15]].
A <dfn>non-control character</dfn> is any valid Unicode character except
those that are part of the "Other, Control" ("Cc") General Category.
A <dfn>combining character</dfn> is any valid Unicode character in the
"Mark, Spacing Combining" ("Mc") General Category or with a non-zero
Combining Class.
<div class="example">
The following are some examples of simple [=key strings=]:
* KEY_NOLINK{a}, KEY_NOLINK{A}, KEY_NOLINK{b}, KEY_NOLINK{B}, ...,
KEY_NOLINK{å}, KEY_NOLINK{é}, KEY_NOLINK{ü}, KEY_NOLINK{ñ}
* KEY_NOLINK{@}, KEY_NOLINK{%}, KEY_NOLINK{$}, KEY_NOLINK{*}, ...,
KEY_NOLINK{0}, KEY_NOLINK{1}, KEY_NOLINK{2}
* KEY_NOLINK{あ}, KEY_NOLINK{日}, KEY_NOLINK{中}, ...,
KEY_NOLINK{一}, KEY_NOLINK{二}, KEY_NOLINK{三}
* KEY_NOLINK{ا}, KEY_NOLINK{ب}, KEY_NOLINK{ة}, KEY_NOLINK{ت}, ...,
KEY_NOLINK{١}, KEY_NOLINK{٢}, KEY_NOLINK{٣}
* KEY_NOLINK{а}, KEY_NOLINK{б}, KEY_NOLINK{в}, KEY_NOLINK{г}
* KEY_NOLINK{±}, KEY_NOLINK{ʶ}, KEY_NOLINK{϶}, KEY_NOLINK{൹}, KEY_NOLINK{℉}
</div>
<div class="example">
With the exception of KEYCAP{Tab} and KEYCAP{Enter} (see [[#control]]),
all non-control whitespace Unicode characters are considered to
be valid [=key strings=].
* KEY_NOLINK{ } = UNI{U+0020} Space
* KEY_NOLINK{ } = UNI{U+00A0} No-Break Space
* KEY_NOLINK{ } = UNI{U+2009} Thin Space
* KEY_NOLINK{ } = UNI{U+3000} Ideographic Space
</div>
<div class="example">
The following are some examples of [=key strings=] with [=combining characters=]:
* KEY_NOLINK{ô} = UNI{U+00F4}
(NOT "o" + " ̂" (UNI{U+006F} UNI{U+0302})
because pre-composed characters must be used if available)
* KEY_NOLINK{ḍ̇} = UNI{U+1E0D} + UNI{U+0307}
(NOT "d" + " ̣" + " ̇" (UNI{U+0064} UNI{U+0323} UNI{U+0307})
because precomposed characters must be used if available,
and NOT "ḋ" + " ̣" (UNI{U+1E0B} UNI{U+0323})
because accents must be ordered before substituting with a precomposed version)
</div>
<h4 id="control">Control Characters</h4>
A small number of characters in the Unicode "Cc" General Category are
supported as [=named key attribute values=]. These named values are as
follows:
* UNI{U+0008} KEY{Backspace}
* UNI{U+0009} KEY{Tab}
* UNI{U+000D} KEY{Enter}
* UNI{U+001B} KEY{Escape}
* UNI{U+007F} KEY{Delete}
<h3 id="selecting-key-attribute-values">Selecting {{KeyboardEvent/key}} Attribute Values</h3>
A <dfn>glyph modifier key</dfn> is any of the following modifier keys:
KEYCAP{Shift}, KEYCAP{CapsLock} or KEYCAP{AltGr}.
<div class="algorithm" data-algorithm="clipboard-read">
<h4 id="h-clipboard-read"><dfn>select an appropriate key attribute value</dfn></h4>
To [=select an appropriate key attribute value=] to store in a {{KeyboardEvent}}'s
{{KeyboardEvent/key}} attribute, run these steps:
1. Let |key| be a DOMString initially set to KEY{Unidentified}.
1. If there exists an appropriate [=named key attribute value=] for this
key event, then
1. Set |key| to that [=named key attribute value=].
1. Else, if the key event generates a valid [=key string=], then
1. Set |key| to that [=key string=] value.
1. Else, if the key event has any modifier keys other than [=glyph modifier keys=], then
1. Set |key| to the [=key string=] that would have been generated
by this event if it had been typed with all modifer keys removed
except for [=glyph modifier keys=].
1. Return |key| as the [=key attribute value=] for this key event.
<p class="example">
On a standard US keyboard, the [=key attribute value=] for the key labeled
KEYCAP{Q} is KEY_NOLINK{q} (or KEY_NOLINK{Q} if the KEYCAP{Shift} modifier
key is also held).
</p>
<p class="example">
On a standard US keyboard, [=key attribute value=] for KEYCAP{Control} +
KEYCAP{Q} is KEY_NOLINK{q}.
</p>
<p class="example">
On a US keyboard with a right-handed Dvorak key mapping, the
[=key attribute value=] for the key labeled KEYCAP{Q} is
KEY_NOLINK{5} (or KEY_NOLINK{%} with KEYCAP{Shift} modifier).
</p>
<p class="example">
On the same US Dvorak keyboard layout as the previous example, the
[=key attribute value=] for KEYCAP{Control} + KEYCAP{Q} is KEY_NOLINK{5}.
</p>
<p class="example">
On a Bolnagri keyboard layout, the [=key attribute value=] for the
key labeled KEYCAP{Q} is a string containing the single Unicode
character UNI{U+200C} (ZWNJ or Zero Width Non-Joining Space).
</p>
<p class="example">
On a French PC keyboard with a standard French mapping, the KEYCAP{^}
key acts as a [=dead key=] for the combining circumflex diacritical mark.
The [=key attribute value=] for this keyboard event is KEY{Dead}.
</p>
<p class="example">
Also on a French keyboard with a standard French mapping, the
[=key attribute value=] for the KEYCAP{é} key (which corresponds to the
KEYCAP{2} key on a US keyboard) is KEY_NOLINK{é} (UNI{U+00E9}).
</p>
<p class="example">
On a Korean PC keyboard with a standard Korean mapping, the primary
function of the KEYCAP{Ha/En} key is to switch between Hangul and English
input. There is an entry for this key as a [=named key attribute value=],
KEY{HangulMode}, so that should be used as the [=key attribute value=].
</p>
</div>
<h2 id="named-key-attribute-values">Named {{KeyboardEvent/key}} Attribute Values</h2>
A <dfn>named key attribute value</dfn> is any of the values given in the
[=key attribute value=] column of any of the tables in this section of the
specification.
The [=named key attribute values=] defined here are based
in part on the sets of keycodes from
the <code>java.awt.event.KeyEvent</code> interface of the Java Platform,
Standard Edition 6 API Specification [[KeyEventJava]], and the
<code>System.Windows.Forms.Keys</code> key enumeration of the Microsoft .NET
Framework 4.0 Class Library [[KeysNet]]. Additional information in this spec
comes from Microsoft's WM_APPCOMMAND messages [[WmAppCommand]], and other
more specialized specifications as noted in this document.
A conforming implementation of the {{KeyboardEvent}} interface MUST support
this set of values for use in the {{KeyboardEvent/key}} attributes,
although not all values may be available on all platforms or devices.
Future versions of this specification may include {{KeyboardEvent/key}} values not included
here, which have become common since the publication of this specification.
<p class="note">
Note: While every attempt has been made to make this list of values as complete as possible,
new values will periodically need to be defined as new input devices are introduced.
Rather than allowing user agents to define their own [=named key attribute values=]
(which are unlikely to be consistent across multiple user agents), bugs SHOULD be
filed so that this specification can be updated.
</p>
<h3 id="keys-special">Special Keys</h3>
Implementations that are unable to identify a key MUST use KEY{Unidentified}
as the [=key attribute value=].
BEGIN_KEY_TABLE general
KEY Unidentified This key value is used when an implementation is unable to
identify another key value, due to either hardware,
platform, or software constraints.
END_KEY_TABLE
<p class="note">
Conforming implementations MUST only use KEY{Unidentified} as a key value
when there is no way for the implementation to detect the key value.
Exposing only this value for all keyboard events MUST NOT indicate a conforming
implementation.
</p>
<h3 id="keys-modifier">Modifier Keys</h3>
BEGIN_KEY_TABLE modifier
KEY Alt The KEYCAP{Alt} (Alternative) key.<br/>
This key enables the alternate modifier function for interpreting concurrent or subsequent keyboard input.<br/>
This key value is also used for the Apple KEYCAP{Option} key.
KEY AltGraph The Alternate Graphics (KEYCAP{AltGr} or KEYCAP{AltGraph}) key.
This key is used enable the ISO Level 3 shift modifier (the standard KEYCAP{Shift} key is the level 2 modifier).
See [[ISO9995-1]].
KEY CapsLock The KEYCAP{Caps Lock} (Capital) key.
Toggle capital character lock function for interpreting subsequent keyboard input event.
KEY Control The KEYCAP{Control} or KEYCAP{Ctrl} key, to enable control modifier function for interpreting concurrent or subsequent keyboard input.
KEY_OPT Fn The Function switch KEYCAP{Fn} key.<br/>
Activating this key simultaneously with another key changes that key's value to an alternate character or function.
This key is often handled directly in the keyboard hardware and does not usually generate key events.
KEY_OPT FnLock The Function-Lock (KEYCAP{FnLock} or KEYCAP{F-Lock}) key.
Activating this key switches the mode of the keyboard to changes some keys' values to an alternate character or function.
This key is often handled directly in the keyboard hardware and does not usually generate key events.
KEY Meta The KEYCAP{Meta} key, to enable meta modifier function for interpreting concurrent or subsequent keyboard input.
This key value is used for the <q>Windows Logo</q> key and the Apple KEYCAP{Command} or KEYCAP{⌘} key.
KEY NumLock The KEYCAP{NumLock} or Number Lock key, to toggle numpad mode function for interpreting subsequent keyboard input.
KEY ScrollLock The KEYCAP{Scroll Lock} key, to toggle between scrolling and cursor movement modes.
KEY Shift The KEYCAP{Shift} key, to enable shift modifier function for interpreting concurrent or subsequent keyboard input.
KEY_OPT Symbol The Symbol modifier key (used on some virtual keyboards).
KEY_OPT SymbolLock The Symbol Lock key.
END_KEY_TABLE
Legacy modifier keys:
BEGIN_KEY_TABLE modifier-legacy
KEY_OPT Hyper The KEYCAP{Hyper} key.
KEY_OPT Super The KEYCAP{Super} key.
END_KEY_TABLE
<h3 id="keys-whitespace">Whitespace Keys</h3>
BEGIN_KEY_TABLE whitespace
KEY Enter The KEYCAP{Enter} or KEYCAP{↵} key, to activate current selection or accept current input.<br/>
This key value is also used for the KEYCAP{Return} (Macintosh numpad) key.<br/>
This key value is also used for the Android KEYCODE_DPAD_CENTER.
KEY Tab The Horizontal Tabulation KEYCAP{Tab} key.
END_KEY_TABLE
<p class="note">The space or spacebar key is encoded as KEY_NOLINK{ }.</p>
<h3 id="keys-navigation">Navigation Keys</h3>
BEGIN_KEY_TABLE navigation
KEY ArrowDown The down arrow key, to navigate or traverse downward. (KEYCODE_DPAD_DOWN)
KEY ArrowLeft The left arrow key, to navigate or traverse leftward. (KEYCODE_DPAD_LEFT)
KEY ArrowRight The right arrow key, to navigate or traverse rightward. (KEYCODE_DPAD_RIGHT)
KEY ArrowUp The up arrow key, to navigate or traverse upward. (KEYCODE_DPAD_UP)
KEY End The End key, used with keyboard entry to go to the end of content (KEYCODE_MOVE_END).
KEY Home The Home key, used with keyboard entry, to go to start of content (KEYCODE_MOVE_HOME).<br/>
For the mobile phone KEYCAP{Home} key (which goes to the phone's main screen), use KEY{GoHome}.
KEY PageDown The Page Down key, to scroll down or display next page of content.
KEY PageUp The Page Up key, to scroll up or display previous page of content.
END_KEY_TABLE
<h3 id="keys-editing">Editing Keys</h3>
BEGIN_KEY_TABLE editing
KEY Backspace The Backspace key. This key value is also used for the key labeled KEYCAP{Delete} on MacOS keyboards.
KEY_OPT Clear Remove the currently selected input.
KEY_OPT Copy Copy the current selection. (APPCOMMAND_COPY)
KEY_OPT CrSel The Cursor Select (Crsel) key.
KEY_OPT Cut Cut the current selection. (APPCOMMAND_CUT)
KEY Delete The Delete (Del) Key.
This key value is also used for the key labeled KEYCAP{Delete} on MacOS keyboards when modified by the KEYCAP{Fn} key.
KEY_OPT EraseEof The Erase to End of Field key. This key deletes all characters from the current cursor position to the end of the current field.
KEY_OPT ExSel The Extend Selection (Exsel) key.
KEY Insert The Insert (Ins) key, to toggle between text modes for insertion or overtyping. (KEYCODE_INSERT)
KEY_OPT Paste The Paste key. (APPCOMMAND_PASTE)
KEY_OPT Redo Redo the last action. (APPCOMMAND_REDO)
KEY_OPT Undo Undo the last action. (APPCOMMAND_UNDO)
END_KEY_TABLE
<h3 id="keys-ui">UI Keys</h3>
BEGIN_KEY_TABLE ui
KEY_OPT Accept The Accept (Commit, OK) key. Accept current option or input method sequence conversion.
KEY_OPT Again The Again key, to redo or repeat an action.
KEY_OPT Attn The Attention (Attn) key.
KEY_OPT Cancel The Cancel key.
KEY ContextMenu Show the application's context menu.
This key is commonly found between the right KEYCAP{Meta} key and the right KEYCAP{Control} key.
KEY Escape The KEYCAP{Esc} key. This key was originally used to initiate an escape sequence, but is
now more generally used to exit or "escape" the current context, such as closing a dialog
or exiting full screen mode.
KEY_OPT Execute The Execute key.
KEY_OPT Find Open the Find dialog. (APPCOMMAND_FIND)
KEY Help Open a help dialog or toggle display of help information. (APPCOMMAND_HELP, KEYCODE_HELP)
KEY Pause Pause the current state or application (as appropriate).
<p class="note">Do not use this value for the KEYCAP{Pause} button on media controllers. Use KEY{MediaPause} instead.</p>
KEY_OPT Play Play or resume the current state or application (as appropriate).
<p class="note">Do not use this value for the KEYCAP{Play} button on media controllers. Use KEY{MediaPlay} instead.</p>
KEY_OPT Props The properties (Props) key.
KEY_OPT Select The Select key.
KEY_OPT ZoomIn The ZoomIn key. (KEYCODE_ZOOM_IN)
KEY_OPT ZoomOut The ZoomOut key. (KEYCODE_ZOOM_OUT)
END_KEY_TABLE
<h3 id="keys-device">Device Keys</h3>
BEGIN_KEY_TABLE device
KEY_OPT BrightnessDown The Brightness Down key. Typically controls the display brightness. (KEYCODE_BRIGHTNESS_DOWN)
KEY_OPT BrightnessUp The Brightness Up key. Typically controls the display brightness. (KEYCODE_BRIGHTNESS_UP)
KEY_OPT Eject Toggle removable media to eject (open) and insert (close) state. (KEYCODE_MEDIA_EJECT)
KEY_OPT LogOff The LogOff key.
KEY_OPT Power Toggle power state. (KEYCODE_POWER)
<p class="note">Note: Some devices might not expose this key to the operating environment.</p>
KEY_OPT PowerOff The KEYCAP{PowerOff} key. Sometime called KEYCAP{PowerDown}.
KEY PrintScreen The KEYCAP{Print Screen} or KEYCAP{SnapShot} key, to initiate print-screen function.
KEY_OPT Hibernate The Hibernate key.
This key saves the current state of the computer to disk so that it can be restored. The computer will then shutdown.
KEY_OPT Standby The Standby key.
This key turns off the display and places the computer into a low-power mode without completely shutting down.
It is sometimes labelled KEYCAP{Suspend} or KEYCAP{Sleep} key. (KEYCODE_SLEEP)
KEY_OPT WakeUp The WakeUp key. (KEYCODE_WAKEUP)
END_KEY_TABLE
<h3 id="keys-composition">IME and Composition Keys</h3>
BEGIN_KEY_TABLE composition
KEY_OPT AllCandidates The All Candidates key, to initiate the multi-candidate mode.
KEY_OPT Alphanumeric The Alphanumeric key.
KEY_OPT CodeInput The Code Input key, to initiate the Code Input mode to allow characters to be entered by their code points.
KEY_OPT Compose The Compose key, also known as <em>Multi_key</em> on the X Window System. This key acts in a manner similar to a
dead key, triggering a mode where subsequent key presses are combined to produce a different character.
KEY_OPT Convert The Convert key, to convert the current input method sequence.
KEY_OPT Dead A dead key combining key. It may be any combining key from any keyboard layout. For example, on a
PC/AT French keyboard, using a French mapping and without any modifier activated, this is the key value
UNI{U+0302} COMBINING CIRCUMFLEX ACCENT. In another layout this might be a different unicode combining key.<br/>
For applications that need to differentiate between specific combining characters, the associated [=compositionupdate=]
event's data attribute provides the specific key value.
KEY_OPT FinalMode The Final Mode KEYCAP{Final} key used on some Asian keyboards, to enable the final mode for IMEs.
KEY_OPT GroupFirst Switch to the first character group. (ISO/IEC 9995)
KEY_OPT GroupLast Switch to the last character group. (ISO/IEC 9995)
KEY_OPT GroupNext Switch to the next character group. (ISO/IEC 9995)
KEY_OPT GroupPrevious Switch to the previous character group. (ISO/IEC 9995)
KEY_OPT ModeChange The Mode Change key, to toggle between or cycle through input modes of IMEs.
KEY_OPT NextCandidate The Next Candidate function key.
KEY_OPT NonConvert The NonConvert ("Don't Convert") key, to accept current input method sequence without conversion in IMEs.
KEY_OPT PreviousCandidate The Previous Candidate function key.
KEY_OPT Process The Process key.
KEY_OPT SingleCandidate The Single Candidate function key.
END_KEY_TABLE
Keys specific to Korean keyboards:
BEGIN_KEY_TABLE ime-korean
KEY_OPT HangulMode The Hangul (Korean characters) Mode key, to toggle between Hangul and English modes.
KEY_OPT HanjaMode The Hanja (Korean characters) Mode key.
KEY_OPT JunjaMode The Junja (Korean characters) Mode key.
END_KEY_TABLE
Keys specific to Japanese keyboards:
BEGIN_KEY_TABLE ime-japanese
KEY_OPT Eisu The Eisu key. This key may close the IME, but its purpose
is defined by the current IME. (KEYCODE_EISU)
KEY_OPT Hankaku The (Half-Width) Characters key.
KEY_OPT Hiragana The Hiragana (Japanese Kana characters) key.
KEY_OPT HiraganaKatakana The Hiragana/Katakana toggle key. (KEYCODE_KATAKANA_HIRAGANA)
KEY_OPT KanaMode The Kana Mode (Kana Lock) key. This key is used to enter
hiragana mode (typically from romaji mode).
KEY_OPT KanjiMode The Kanji (Japanese name for ideographic characters of Chinese origin) Mode key.
This key is typically used to switch to a hiragana keyboard for
the purpose of converting input into kanji. (KEYCODE_KANA)
KEY_OPT Katakana The Katakana (Japanese Kana characters) key.
KEY_OPT Romaji The Roman characters function key.
KEY_OPT Zenkaku The Zenkaku (Full-Width) Characters key.
KEY_OPT ZenkakuHankaku The Zenkaku/Hankaku (full-width/half-width) toggle key. (KEYCODE_ZENKAKU_HANKAKU)
END_KEY_TABLE
<h3 id="keys-function">General-Purpose Function Keys</h3>
The exact number of these general purpose function keys varies on different
platforms, and only the first few are defined explicitly here. Additional
function key names are implicitly defined by incrementing the base-10 index at
the end of the function key name. Thus, KEY_NOLINK{F24}
and KEY_NOLINK{Soft8} are all valid key values.
BEGIN_KEY_TABLE function
KEY F1 The F1 key, a general purpose function key, as index 1.
KEY F2 The F2 key, a general purpose function key, as index 2.
KEY F3 The F3 key, a general purpose function key, as index 3.
KEY F4 The F4 key, a general purpose function key, as index 4.
KEY F5 The F5 key, a general purpose function key, as index 5.
KEY F6 The F6 key, a general purpose function key, as index 6.
KEY F7 The F7 key, a general purpose function key, as index 7.
KEY F8 The F8 key, a general purpose function key, as index 8.
KEY F9 The F9 key, a general purpose function key, as index 9.
KEY F10 The F10 key, a general purpose function key, as index 10.
KEY F11 The F11 key, a general purpose function key, as index 11.
KEY F12 The F12 key, a general purpose function key, as index 12.
KEY_OPT Soft1 General purpose virtual function key, as index 1.
KEY_OPT Soft2 General purpose virtual function key, as index 2.
KEY_OPT Soft3 General purpose virtual function key, as index 3.
KEY_OPT Soft4 General purpose virtual function key, as index 4.
END_KEY_TABLE
<h3 id="keys-multimedia">Multimedia Keys</h3>
These are extra keys found on "multimedia" keyboards.
BEGIN_KEY_TABLE multimedia
KEY_OPT ChannelDown Select next (numerically or logically) lower channel. (APPCOMMAND_MEDIA_CHANNEL_DOWN, KEYCODE_CHANNEL_DOWN)
KEY_OPT ChannelUp Select next (numerically or logically) higher channel. (APPCOMMAND_MEDIA_CHANNEL_UP, KEYCODE_CHANNEL_UP)
KEY_OPT Close Close the current document or message (Note: This doesn't close the application). (APPCOMMAND_CLOSE)
KEY_OPT MailForward Open an editor to forward the current message. (APPCOMMAND_FORWARD_MAIL)
KEY_OPT MailReply Open an editor to reply to the current message. (APPCOMMAND_REPLY_TO_MAIL)
KEY_OPT MailSend Send the current message. (APPCOMMAND_SEND_MAIL)
KEY_OPT MediaClose Close the current media, for example to close a CD or DVD tray. (KEYCODE_MEDIA_CLOSE)
KEY_OPT MediaFastForward Initiate or continue forward playback at faster than normal speed, or increase speed if already fast forwarding. (APPCOMMAND_MEDIA_FAST_FORWARD, KEYCODE_MEDIA_FAST_FORWARD)
KEY_OPT MediaPause Pause the currently playing media. (APPCOMMAND_MEDIA_PAUSE, KEYCODE_MEDIA_PAUSE)
<p class="note">Media controller devices should use this value rather than KEY{Pause} for their pause keys.</p>
KEY_OPT MediaPlay Initiate or continue media playback at normal speed, if not currently playing at normal speed. (APPCOMMAND_MEDIA_PLAY, KEYCODE_MEDIA_PLAY)
KEY_OPT MediaPlayPause Toggle media between play and pause states. (APPCOMMAND_MEDIA_PLAY_PAUSE, KEYCODE_MEDIA_PLAY_PAUSE)
KEY_OPT MediaRecord Initiate or resume recording of currently selected media. (APPCOMMAND_MEDIA_RECORD, KEYCODE_MEDIA_RECORD)
KEY_OPT MediaRewind Initiate or continue reverse playback at faster than normal speed, or increase speed if already rewinding. (APPCOMMAND_MEDIA_REWIND, KEYCODE_MEDIA_REWIND)
KEY_OPT MediaStop Stop media playing, pausing, forwarding, rewinding, or recording, if not already stopped. (APPCOMMAND_MEDIA_STOP, KEYCODE_MEDIA_STOP)
KEY_OPT MediaTrackNext Seek to next media or program track. (APPCOMMAND_MEDIA_NEXTTRACK, KEYCODE_MEDIA_NEXT)
KEY_OPT MediaTrackPrevious Seek to previous media or program track. (APPCOMMAND_MEDIA_PREVIOUSTRACK, KEYCODE_MEDIA_PREVIOUS)
KEY_OPT New Open a new document or message. (APPCOMMAND_NEW)
KEY_OPT Open Open an existing document or message. (APPCOMMAND_OPEN)
KEY_OPT Print Print the current document or message. (APPCOMMAND_PRINT)
KEY_OPT Save Save the current document or message. (APPCOMMAND_SAVE)
KEY_OPT SpellCheck Spellcheck the current document or selection. (APPCOMMAND_SPELL_CHECK)
END_KEY_TABLE
<h3 id="keys-multimedia-numpad">Multimedia Numpad Keys</h3>
The normal KEYCAP{0} ... KEYCAP{9} numpad keys
are encoded as KEY_NOLINK{0} ... KEY_NOLINK{9}, but some
multimedia keypads have buttons numbered from KEYCAP{1} ... KEYCAP{12}.
In these instances, the KEYCAP{10} key is often labeled KEYCAP{10 /0}.
<p class="note">
Note: If supported, the KEYCAP{10} or KEYCAP{10 /0} key MUST be assigned a
{{KeyboardEvent/key}} value of KEY_NOLINK{0}.
</p>
BEGIN_KEY_TABLE multimedia-numpad
KEY_OPT Key11 The KEYCAP{11} key found on media numpads that
have buttons from KEYCAP{1} ... KEYCAP{12}.
KEY_OPT Key12 The KEYCAP{12} key found on media numpads that
have buttons from KEYCAP{1} ... KEYCAP{12}.
END_KEY_TABLE
<h3 id="keys-audio">Audio Keys</h3>
Multimedia keys related to audio.
BEGIN_KEY_TABLE audio
KEY_OPT AudioBalanceLeft Adjust audio balance leftward. (VK_AUDIO_BALANCE_LEFT)
KEY_OPT AudioBalanceRight Adjust audio balance rightward. (VK_AUDIO_BALANCE_RIGHT)
KEY_OPT AudioBassBoostDown Decrease audio bass boost or cycle down through bass boost states. (APPCOMMAND_BASS_DOWN, VK_BASS_BOOST_DOWN)
KEY_OPT AudioBassBoostToggle Toggle bass boost on/off. (APPCOMMAND_BASS_BOOST)
KEY_OPT AudioBassBoostUp Increase audio bass boost or cycle up through bass boost states. (APPCOMMAND_BASS_UP, VK_BASS_BOOST_UP)
KEY_OPT AudioFaderFront Adjust audio fader towards front. (VK_FADER_FRONT)
KEY_OPT AudioFaderRear Adjust audio fader towards rear. (VK_FADER_REAR)
KEY_OPT AudioSurroundModeNext Advance surround audio mode to next available mode. (VK_SURROUND_MODE_NEXT)
KEY_OPT AudioTrebleDown Decrease treble. (APPCOMMAND_TREBLE_DOWN)
KEY_OPT AudioTrebleUp Increase treble. (APPCOMMAND_TREBLE_UP)
KEY_OPT AudioVolumeDown Decrease audio volume. (APPCOMMAND_VOLUME_DOWN, KEYCODE_VOLUME_DOWN)
KEY_OPT AudioVolumeUp Increase audio volume. (APPCOMMAND_VOLUME_UP, KEYCODE_VOLUME_UP)
KEY_OPT AudioVolumeMute Toggle between muted state and prior volume level. (APPCOMMAND_VOLUME_MUTE, KEYCODE_VOLUME_MUTE)
KEY_OPT MicrophoneToggle Toggle the microphone on/off. (APPCOMMAND_MIC_ON_OFF_TOGGLE)
KEY_OPT MicrophoneVolumeDown Decrease microphone volume. (APPCOMMAND_MICROPHONE_VOLUME_DOWN)
KEY_OPT MicrophoneVolumeUp Increase microphone volume. (APPCOMMAND_MICROPHONE_VOLUME_UP)
KEY_OPT MicrophoneVolumeMute Mute the microphone. (APPCOMMAND_MICROPHONE_VOLUME_MUTE, KEYCODE_MUTE)
END_KEY_TABLE
<h3 id="keys-speech">Speech Keys</h3>
Multimedia keys related to speech recognition.
BEGIN_KEY_TABLE speech
KEY_OPT SpeechCorrectionList Show correction list when a word is incorrectly identified. (APPCOMMAND_CORRECTION_LIST)
KEY_OPT SpeechInputToggle Toggle between dictation mode and command/control mode. (APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE)
END_KEY_TABLE
<h3 id="keys-apps">Application Keys</h3>
The Application Keys are special keys that are assigned to launch a particular application.
Additional application key names can be defined by concatenating "Launch" with the name
of the application.
BEGIN_KEY_TABLE apps
KEY_OPT LaunchApplication1 The first generic "LaunchApplication" key. This is commonly associated with launching "My Computer", and may have a computer symbol on the key. (APPCOMMAND_LAUNCH_APP1)
KEY_OPT LaunchApplication2 The second generic "LaunchApplication" key. This is commonly associated with launching "Calculator", and may have a calculator symbol on the key. (APPCOMMAND_LAUNCH_APP2, KEYCODE_CALCULATOR)
KEY_OPT LaunchCalendar The "Calendar" key. (KEYCODE_CALENDAR)
KEY_OPT LaunchContacts The "Contacts" key. (KEYCODE_CONTACTS)
KEY_OPT LaunchMail The "Mail" key. (APPCOMMAND_LAUNCH_MAIL)
KEY_OPT LaunchMediaPlayer The "Media Player" key. (APPCOMMAND_LAUNCH_MEDIA_SELECT)
KEY_OPT LaunchMusicPlayer The "Music Player" key.
KEY_OPT LaunchPhone The "Phone" key.
KEY_OPT LaunchScreenSaver The "Screen Saver" key.
KEY_OPT LaunchSpreadsheet The "Spreadsheet" key.
KEY_OPT LaunchWebBrowser The "Web Browser" key.
KEY_OPT LaunchWebCam The "WebCam" key.
KEY_OPT LaunchWordProcessor The "Word Processor" key.
END_KEY_TABLE
<h3 id="keys-browser">Browser Keys</h3>
BEGIN_KEY_TABLE browser
KEY_OPT BrowserBack Navigate to previous content or page in current history. (APPCOMMAND_BROWSER_BACKWARD)
KEY_OPT BrowserFavorites Open the list of browser favorites. (APPCOMMAND_BROWSER_FAVORITES)
KEY_OPT BrowserForward Navigate to next content or page in current history. (APPCOMMAND_BROWSER_FORWARD)
KEY_OPT BrowserHome Go to the user's preferred home page. (APPCOMMAND_BROWSER_HOME)
KEY_OPT BrowserRefresh Refresh the current page or content. (APPCOMMAND_BROWSER_REFRESH)
KEY_OPT BrowserSearch Call up the user's preferred search page. (APPCOMMAND_BROWSER_SEARCH)
KEY_OPT BrowserStop Stop loading the current page or content. (APPCOMMAND_BROWSER_STOP)
END_KEY_TABLE
<h3 id="keys-mobile">Mobile Phone Keys</h3>
BEGIN_KEY_TABLE mobile-phone
KEY_OPT AppSwitch The Application switch key, which provides a list of recent apps to switch between. (KEYCODE_APP_SWITCH)
KEY_OPT Call The Call key. (KEYCODE_CALL)
KEY_OPT Camera The Camera key. (KEYCODE_CAMERA)
KEY_OPT CameraFocus The Camera focus key. (KEYCODE_FOCUS)
KEY_OPT EndCall The End Call key. (KEYCODE_ENDCALL)
KEY_OPT GoBack The Back key. (KEYCODE_BACK)
KEY_OPT GoHome The Home key, which goes to the phone's main screen. (KEYCODE_HOME)
KEY_OPT HeadsetHook The Headset Hook key. (KEYCODE_HEADSETHOOK)
KEY_OPT LastNumberRedial The Last Number Redial key.
KEY_OPT Notification The Notification key. (KEYCODE_NOTIFICATION)
KEY_OPT MannerMode Toggle between manner mode state: silent, vibrate, ring, ... (KEYCODE_MANNER_MODE)
KEY_OPT VoiceDial The Voice Dial key.
END_KEY_TABLE
<h3 id="keys-tv">TV Keys</h3>
BEGIN_KEY_TABLE tv
KEY_OPT TV Switch to viewing TV. (KEYCODE_TV)
KEY_OPT TV3DMode TV 3D Mode. (KEYCODE_3D_MODE)
KEY_OPT TVAntennaCable Toggle between antenna and cable input. (KEYCODE_TV_ANTENNA_CABLE)
KEY_OPT TVAudioDescription Audio description. (KEYCODE_TV_AUDIO_DESCRIPTION)
KEY_OPT TVAudioDescriptionMixDown Audio description mixing volume down. (KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN)
KEY_OPT TVAudioDescriptionMixUp Audio description mixing volume up. (KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP)
KEY_OPT TVContentsMenu Contents menu. (KEYCODE_TV_CONTENTS_MENU)
KEY_OPT TVDataService Contents menu. (KEYCODE_TV_DATA_SERVICE)
KEY_OPT TVInput Switch the input mode on an external TV. (KEYCODE_TV_INPUT)
KEY_OPT TVInputComponent1 Switch to component input #1. (KEYCODE_TV_INPUT_COMPONENT_1)
KEY_OPT TVInputComponent2 Switch to component input #2. (KEYCODE_TV_INPUT_COMPONENT_2)
KEY_OPT TVInputComposite1 Switch to composite input #1. (KEYCODE_TV_INPUT_COMPOSITE_1)
KEY_OPT TVInputComposite2 Switch to composite input #2. (KEYCODE_TV_INPUT_COMPOSITE_2)
KEY_OPT TVInputHDMI1 Switch to HDMI input #1. (KEYCODE_TV_INPUT_HDMI_1)
KEY_OPT TVInputHDMI2 Switch to HDMI input #2. (KEYCODE_TV_INPUT_HDMI_2)
KEY_OPT TVInputHDMI3 Switch to HDMI input #3. (KEYCODE_TV_INPUT_HDMI_3)
KEY_OPT TVInputHDMI4 Switch to HDMI input #4. (KEYCODE_TV_INPUT_HDMI_4)
KEY_OPT TVInputVGA1 Switch to VGA input #1. (KEYCODE_TV_INPUT_VGA_1)
KEY_OPT TVMediaContext Media context menu. (KEYCODE_TV_MEDIA_CONTEXT_MENU)
KEY_OPT TVNetwork Toggle network. (KEYCODE_TV_NETWORK)
KEY_OPT TVNumberEntry Number entry. (KEYCODE_TV_NUMBER_ENTRY)
KEY_OPT TVPower Toggle the power on an external TV. (KEYCODE_TV_POWER)
KEY_OPT TVRadioService Radio. (KEYCODE_TV_RADIO_SERVICE)
KEY_OPT TVSatellite Satellite. (KEYCODE_TV_SATELLITE)
KEY_OPT TVSatelliteBS Broadcast Satellite. (KEYCODE_TV_SATELLITE_BS)
KEY_OPT TVSatelliteCS Communication Satellite. (KEYCODE_TV_SATELLITE_CS)
KEY_OPT TVSatelliteToggle Toggle between available satellites. (KEYCODE_TV_SATELLITE_SERVICE)
KEY_OPT TVTerrestrialAnalog Analog Terrestrial. (KEYCODE_TV_TERRESTRIAL_ANALOG)
KEY_OPT TVTerrestrialDigital Digital Terrestrial. (KEYCODE_TV_TERRESTRIAL_DIGITAL)
KEY_OPT TVTimer Timer programming. (KEYCODE_TV_TIMER_PROGRAMMING)
END_KEY_TABLE
<h3 id="keys-media-controller">Media Controller Keys</h3>
The [=key attribute values=] for media controllers (e.g. remote controls for
television, audio systems, and set-top boxes) are derived in part from
the consumer electronics technical specifications:
* DTV Application Software Environment [[DASE]]
* Open Cable Application Platform 1.1.3 [[OCAP]]
* ANSI/CTA-2014-B, Web-based Protocol and Framework for Remote User
Interface on UPnP Networks and the Internet [[WEB4CE]]
* Android KeyEvent KEYCODEs [[AndroidKeycode]]
BEGIN_KEY_TABLE media-controller
KEY_OPT AVRInput Switch the input mode on an external AVR (audio/video receiver). (KEYCODE_AVR_INPUT)
KEY_OPT AVRPower Toggle the power on an external AVR (audio/video receiver). (KEYCODE_AVR_POWER)
KEY_OPT ColorF0Red General purpose color-coded media function key, as index 0 (red). (VK_COLORED_KEY_0, KEYCODE_PROG_RED)
KEY_OPT ColorF1Green General purpose color-coded media function key, as index 1 (green). (VK_COLORED_KEY_1, KEYCODE_PROG_GREEN)
KEY_OPT ColorF2Yellow General purpose color-coded media function key, as index 2 (yellow). (VK_COLORED_KEY_2, KEYCODE_PROG_YELLOW)
KEY_OPT ColorF3Blue General purpose color-coded media function key, as index 3 (blue). (VK_COLORED_KEY_3, KEYCODE_PROG_BLUE)
KEY_OPT ColorF4Grey General purpose color-coded media function key, as index 4 (grey). (VK_COLORED_KEY_4)
KEY_OPT ColorF5Brown General purpose color-coded media function key, as index 5 (brown). (VK_COLORED_KEY_5)
KEY_OPT ClosedCaptionToggle Toggle the display of Closed Captions. (VK_CC, KEYCODE_CAPTIONS)
KEY_OPT Dimmer Adjust brightness of device, by toggling between or cycling through states. (VK_DIMMER)
KEY_OPT DisplaySwap Swap video sources. (VK_DISPLAY_SWAP)
KEY_OPT DVR Select Digital Video Rrecorder. (KEYCODE_DVR)
KEY_OPT Exit Exit the current application. (VK_EXIT)
KEY_OPT FavoriteClear0 Clear program or content stored as favorite 0. (VK_CLEAR_FAVORITE_0)
KEY_OPT FavoriteClear1 Clear program or content stored as favorite 1. (VK_CLEAR_FAVORITE_1)
KEY_OPT FavoriteClear2 Clear program or content stored as favorite 2. (VK_CLEAR_FAVORITE_2)
KEY_OPT FavoriteClear3 Clear program or content stored as favorite 3. (VK_CLEAR_FAVORITE_3)
KEY_OPT FavoriteRecall0 Select (recall) program or content stored as favorite 0. (VK_RECALL_FAVORITE_0)
KEY_OPT FavoriteRecall1 Select (recall) program or content stored as favorite 1. (VK_RECALL_FAVORITE_1)
KEY_OPT FavoriteRecall2 Select (recall) program or content stored as favorite 2. (VK_RECALL_FAVORITE_2)
KEY_OPT FavoriteRecall3 Select (recall) program or content stored as favorite 3. (VK_RECALL_FAVORITE_3)
KEY_OPT FavoriteStore0 Store current program or content as favorite 0. (VK_STORE_FAVORITE_0)
KEY_OPT FavoriteStore1 Store current program or content as favorite 1. (VK_STORE_FAVORITE_1)
KEY_OPT FavoriteStore2 Store current program or content as favorite 2. (VK_STORE_FAVORITE_2)
KEY_OPT FavoriteStore3 Store current program or content as favorite 3. (VK_STORE_FAVORITE_3)
KEY_OPT Guide Toggle display of program or content guide. (VK_GUIDE, KEYCODE_GUIDE)
KEY_OPT GuideNextDay If guide is active and displayed, then display next day's content. (VK_NEXT_DAY)
KEY_OPT GuidePreviousDay If guide is active and displayed, then display previous day's content. (VK_PREV_DAY)
KEY_OPT Info Toggle display of information about currently selected context or media. (VK_INFO, KEYCODE_INFO)
KEY_OPT InstantReplay Toggle instant replay. (VK_INSTANT_REPLAY)
KEY_OPT Link Launch linked content, if available and appropriate. (VK_LINK)
KEY_OPT ListProgram List the current program. (VK_LIST)
KEY_OPT LiveContent Toggle display listing of currently available live content or programs. (VK_LIVE)
KEY_OPT Lock Lock or unlock current content or program. (VK_LOCK)
KEY_OPT MediaApps Show a list of media applications: audio/video players and image viewers. (VK_APPS)
<p class="note">Do not confuse this key value with the Windows' VK_APPS / VK_CONTEXT_MENU key, which is encoded as KEY{ContextMenu}.</p>
KEY_OPT MediaAudioTrack Audio track key. (KEYCODE_MEDIA_AUDIO_TRACK)
KEY_OPT MediaLast Select previously selected channel or media. (VK_LAST, KEYCODE_LAST_CHANNEL)
KEY_OPT MediaSkipBackward Skip backward to next content or program. (KEYCODE_MEDIA_SKIP_BACKWARD)
KEY_OPT MediaSkipForward Skip forward to next content or program. (VK_SKIP, KEYCODE_MEDIA_SKIP_FORWARD)
KEY_OPT MediaStepBackward Step backward to next content or program. (KEYCODE_MEDIA_STEP_BACKWARD)
KEY_OPT MediaStepForward Step forward to next content or program. (KEYCODE_MEDIA_STEP_FORWARD)
KEY_OPT MediaTopMenu Media top menu. (KEYCODE_MEDIA_TOP_MENU)
KEY_OPT NavigateIn Navigate in. (KEYCODE_NAVIGATE_IN)
KEY_OPT NavigateNext Navigate to next key. (KEYCODE_NAVIGATE_NEXT)
KEY_OPT NavigateOut Navigate out. (KEYCODE_NAVIGATE_OUT)
KEY_OPT NavigatePrevious Navigate to previous key. (KEYCODE_NAVIGATE_PREVIOUS)
KEY_OPT NextFavoriteChannel Cycle to next favorite channel (in favorites list). (VK_NEXT_FAVORITE_CHANNEL)
KEY_OPT NextUserProfile Cycle to next user profile (if there are multiple user profiles). (VK_USER)
KEY_OPT OnDemand Access on-demand content or programs. (VK_ON_DEMAND)
KEY_OPT Pairing Pairing key to pair devices. (KEYCODE_PAIRING)
KEY_OPT PinPDown Move picture-in-picture window down. (VK_PINP_DOWN)
KEY_OPT PinPMove Move picture-in-picture window. (VK_PINP_MOVE)
KEY_OPT PinPToggle Toggle display of picture-in-picture window. (VK_PINP_TOGGLE)
KEY_OPT PinPUp Move picture-in-picture window up. (VK_PINP_UP)
KEY_OPT PlaySpeedDown Decrease media playback speed. (VK_PLAY_SPEED_DOWN)
KEY_OPT PlaySpeedReset Reset playback to normal speed. (VK_PLAY_SPEED_RESET)
KEY_OPT PlaySpeedUp Increase media playback speed. (VK_PLAY_SPEED_UP)
KEY_OPT RandomToggle Toggle random media or content shuffle mode. (VK_RANDOM_TOGGLE)
KEY_OPT RcLowBattery Not a physical key, but this key code is sent when the remote control battery is low. (VK_RC_LOW_BATTERY)
KEY_OPT RecordSpeedNext Toggle or cycle between media recording speeds. (VK_RECORD_SPEED_NEXT)
KEY_OPT RfBypass Toggle RF (radio frequency) input bypass mode (pass RF input directly to the RF output). (VK_RF_BYPASS)
KEY_OPT ScanChannelsToggle Toggle scan channels mode. (VK_SCAN_CHANNELS_TOGGLE)
KEY_OPT ScreenModeNext Advance display screen mode to next available mode. (VK_SCREEN_MODE_NEXT)
KEY_OPT Settings Toggle display of device settings screen. (VK_SETTINGS, KEYCODE_SETTINGS)
KEY_OPT SplitScreenToggle Toggle split screen mode. (VK_SPLIT_SCREEN_TOGGLE)
KEY_OPT STBInput Switch the input mode on an external STB (set top box). (KEYCODE_STB_INPUT)
KEY_OPT STBPower Toggle the power on an external STB (set top box). (KEYCODE_STB_POWER)
KEY_OPT Subtitle Toggle display of subtitles, if available. (VK_SUBTITLE)
KEY_OPT Teletext Toggle display of teletext, if available (VK_TELETEXT, KEYCODE_TV_TELETEXT).
KEY_OPT VideoModeNext Advance video mode to next available mode. (VK_VIDEO_MODE_NEXT)
KEY_OPT Wink Cause device to identify itself in some manner, e.g., audibly or visibly. (VK_WINK)
KEY_OPT ZoomToggle Toggle between full-screen and scaled content, or alter magnification level. (VK_ZOOM, KEYCODE_TV_ZOOM_MODE)
END_KEY_TABLE
Some of the keys defined in the media controller standards already have
appropriate keys defined in other sections of this specification. These
following table summarizes the key values that MUST be used if these keys are
supported:
BEGIN_KEY_TABLE media-controller-dup
KEY_DUP_OPT AudioVolumeDown Decrease audio volume. (VK_VOLUME_DOWN)
KEY_DUP_OPT AudioVolumeUp Increase audio volume. (VK_VOLUME_UP)
KEY_DUP_OPT AudioVolumeMute Toggle between muted state and prior volume level. (VK_VOLUME_MUTE)
KEY_DUP_OPT BrowserBack Navigate to previous content or page in current history. (VK_BACK)
KEY_DUP_OPT BrowserForward Navigate to next content or page in current history. (VK_FORWARD)
KEY_DUP_OPT ChannelDown Select next (numerically or logically) lower channel. (VK_CHANNEL_DOWN)
KEY_DUP_OPT ChannelUp Select next (numerically or logically) higher channel. (VK_CHANNEL_UP)
KEY_DUP ContextMenu Toggle display of the on-screen menu. (VK_MENU)
KEY_DUP_OPT Eject Toggle removable media to eject (open) and insert (close) state. (VK_EJECT_TOGGLE)
KEY_DUP End The End key, used with keyboard entry to go to the end of content. (VK_GO_TO_END)
KEY_DUP Enter The Enter key, to activate current selection or accept current input. (VK_SELECT)
KEY_DUP Home The Home key, used with keyboard entry, to go to start of content. (VK_GO_TO_START)
KEY_DUP_OPT MediaFastForward Initiate or continue forward playback at faster than normal speed, or increase speed if already fast forwarding. (VK_FAST_FWD)
KEY_DUP_OPT MediaPlay Initiate or continue media playback at normal speed, if not currently playing at normal speed. (VK_PLAY)
KEY_DUP_OPT MediaPlayPause Toggle media between play and pause states. (VK_PLAY_PAUSE)
KEY_DUP_OPT MediaRecord Initiate or resume recording of currently selected media. (VK_RECORD)
KEY_DUP_OPT MediaRewind Initiate or continue reverse playback at faster than normal speed, or increase speed if already rewinding. (VK_REWIND)
KEY_DUP_OPT MediaStop Stop media playing, pausing, forwarding, rewinding, or recording, if not already stopped. (VK_STOP)
KEY_DUP_OPT MediaPause Pause the currently playing media. (VK_PAUSE)
KEY_DUP_OPT MediaTrackNext Seek to next media or program track. (VK_TRACK_NEXT)
KEY_DUP_OPT MediaTrackPrevious Seek to previous media or program track. (VK_TRACK_PREV)
KEY_DUP_OPT Power Toggle power state. (VK_POWER)
KEY_DUP Unidentified This key value is used when an implementations is unable to identify another key value, due to either hardware, platform, or software constraints. (VK_UNDEFINED)
END_KEY_TABLE
<h2 id="accessibility">Accessibility</h2>
This specification simply defines a set of values that are valid for use in the
{{KeyboardEvent/key}} attribute. Thus, it does not introduce any features that have
accessibility concerns.
The <a href="https://w3c.github.io/apa/fast/checklist.html">FAST checklist</a> has been completed and nothing is applicable to this specification.
A note related to the FAST checklist item: "If technology provides internationalization support".
This specification inherently defines {{KeyboardEvent/key}} values that support international hardware, e.g.,
keyboards for different languages or layouts. It also defines many special keys which are given
human-readable names (like "Shift", "Control", "Home" or "ArrowLeft").
These special key values are defined as human-readable strings so that code to detect special keys
can be easier to understand. While these values are not intended to be exposed directly to users,
there is nothing preventing that. Apps that choose to expose these values would need to determine
whether or not it is appropriate to translate these strings for presentation (e.g.: presenting
"Backspace" as "Suppr. arrière" for French users).
<h2 id="i18n">I18n</h2>
The <a href="https://www.w3.org/International/i18n-drafts/techniques/shortchecklist">short I18n checklist</a>
has been completed and none of the items apply.
<h2 id="security">Security Considerations</h2>
The <a href="https://www.w3.org/TR/security-privacy-questionnaire/">Security and Privacy Self-Review Questionairre</a>
has been completed with the following notes:
* <em>2.1 What information might this feature expose to Web sites or other parties, and for what purposes is that exposure necessary?</em>:
This spec defines a set of valid values for the {{KeyboardEvent/key}} attribute of the various
key events. This is necessary so that users can type text.
* <em>2.17 How does your feature handle non-"fully active" documents?</em>:
This attribute is only associated with key events, and events are not sent if the document is
not fully active.
Security concerns associated with the {{KeyboardEvent/key}} attribute are addressed in the [[UIEvents]]
specification.
<h2 id="privacy">Privacy Considerations</h2>
The <a href="https://www.w3.org/TR/security-privacy-questionnaire/">Security and Privacy Self-Review Questionairre</a>
has been completed with the following notes:
* <em>2.6 Do the features in your specification expose information about the underlying platform to origins?</em>:
The {{KeyboardEvent/key}} attribute contains the value of the key that is pressed by the user.
This could be used to infer that a user is using a keyboard with a particular locale (or IME)
enabled.
* <em>3.5 Legitimate Misuse</em>:
A site could capture all keypresses and build a map of the values generated by the keyboard. If the
user types enough values (and doesn't change keyboard), then the site could try to match those values
against a database of known keyboard layouts to guess the user's current keyboard layout. However,
that's a concern for the {{KeyboardEvent/key}} attribute itself (defined in the [[UIEvents]] specification) rather than
something specific to the values defined in this document
Privacy concerns associated with the {{KeyboardEvent/key}} attribute are addressed in the [[UIEvents]]
specification.
<h2 id="acknowledgements-contributors">Acknowledgements</h2>
Over the years, many people contributed to the DOM {{KeyboardEvent}}
specifications, including many participants of the DOM Working Group and the
WebApps Working Group. The current set of {{KeyboardEvent/key}} values is
the result of iterating over many proposals and variations during that time.
We especially thank the following participants for their contributions:
Gary Kacmarcik (Google),
Masayuki Nakano (Mozilla)
and
Travis Leithead (Microsoft).