1  /*
2   * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3   * Licensed under the Apache License, Version 2.0 (the "License");
4   * you may not use this file except in compliance with the License.
5   * You may obtain a copy of the License at
6   *
7   * http://www.apache.org/licenses/LICENSE-2.0
8   *
9   * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  
16  #ifndef HOS_KEY_EVENT_H
17  #define HOS_KEY_EVENT_H
18  
19  #include "define_multimodal.h"
20  
21  namespace OHOS {
22  enum HosKeyState {
23      /**
24       * Indicates that the key is being pressed down.
25       *
26       * @since 3
27       */
28      HOS_KEY_PRESSED = 0,
29  
30      /**
31       * Indicates that the key is being released.
32       *
33       * @since 3
34       */
35      HOS_KEY_RELEASED = 1,
36  };
37  
38  enum HosKeyEventEnum {
39      /**
40       * Keycode constant: unknown keycode
41       * <p>The keycode is unknown.
42       *
43       * @since 1
44       */
45      HOS_UNKNOWN_KEY_BASE = 10000,
46      HOS_KEY_UNKNOWN = -1,
47      /**
48       * Keycode constant: Fn key
49       *
50       * @since 1
51       */
52      HOS_KEY_FN = 0,
53      /**
54       * Keycode constant: Home key
55       * <p>This key is processed by the framework and will never be sent to the application.
56       *
57       * @since 1
58       */
59      HOS_KEY_HOME = 1,
60  
61      /**
62       * Keycode constant: Back key
63       *
64       * @since 1
65       */
66      HOS_KEY_BACK = 2,
67  
68      /**
69       * Keycode constant: Call key
70       *
71       * @since 1
72       */
73      HOS_KEY_CALL = 3,
74  
75      /**
76       * Keycode constant: End Call key
77       *
78       * @since 1
79       */
80      HOS_KEY_ENDCALL = 4,
81  
82      /**
83       * Keycode constant: Clear key
84       *
85       * @since 1
86       */
87      HOS_KEY_CLEAR = 5,
88  
89      /**
90       * Keycode constant: Headset Hook key
91       * <p>The key is used to end a call and stop media.
92       *
93       * @since 1
94       */
95      HOS_KEY_HEADSETHOOK = 6,
96  
97      /**
98       * Keycode constant: Camera Focus key
99       * <p>This key is used to enable focus for the camera.
100       *
101       * @since 1
102       */
103      HOS_KEY_FOCUS = 7,
104  
105      /**
106       * Keycode constant: Notification key
107       *
108       * @since 1
109       */
110      HOS_KEY_NOTIFICATION = 8,
111  
112      /**
113       * Keycode constant: Search key
114       *
115       * @since 1
116       */
117      HOS_KEY_SEARCH = 9,
118  
119      /**
120       * Keycode constant: Play/Pause media key
121       *
122       * @since 1
123       */
124      HOS_KEY_MEDIA_PLAY_PAUSE = 10,
125  
126      /**
127       * Keycode constant: Stop media key
128       *
129       * @since 1
130       */
131      HOS_KEY_MEDIA_STOP = 11,
132  
133      /**
134       * Keycode constant: Play Next media key
135       *
136       * @since 1
137       */
138      HOS_KEY_MEDIA_NEXT = 12,
139  
140      /**
141       * Keycode constant: Play Previous media key
142       *
143       * @since 1
144       */
145      HOS_KEY_MEDIA_PREVIOUS = 13,
146  
147      /**
148       * Keycode constant: Rewind media key
149       *
150       * @since 1
151       */
152      HOS_KEY_MEDIA_REWIND = 14,
153  
154      /**
155       * Keycode constant: Fast Forward media key
156       *
157       * @since 1
158       */
159      HOS_KEY_MEDIA_FAST_FORWARD = 15,
160  
161      /**
162       * Turns up the volume.
163       *
164       * @since 1
165       */
166      HOS_KEY_VOLUME_UP = 16,
167  
168      /**
169       * Turns down the volume.
170       *
171       * @since 1
172       */
173      HOS_KEY_VOLUME_DOWN = 17,
174  
175      /**
176       * Presses the power button.
177       *
178       * @since 1
179       */
180      HOS_KEY_POWER = 18,
181  
182      /**
183       * Presses the camera key.
184       * <p>It is used to start the camera or take photos.
185       *
186       * @since 1
187       */
188      HOS_KEY_CAMERA = 19,
189  
190      /**
191       * Voice Assistant key
192       * <p>This key is used to wake up the voice assistant.
193       *
194       * @since 1
195       */
196      HOS_KEY_VOICE_ASSISTANT = 20,
197  
198      /**
199       * Custom key 1
200       * <p>The actions mapping to the custom keys are user-defined. Key values 521-529 are reserved for custom keys.
201       *
202       * @since 1
203       */
204      HOS_KEY_CUSTOM1 = 21,
205  
206      HOS_KEY_VOLUME_MUTE = 22,
207      HOS_KEY_MUTE = 23,
208  
209      /**
210       * Brightness UP key
211       *
212       * @since 1
213       */
214      HOS_KEY_BRIGHTNESS_UP = 40,
215  
216      /**
217       * Brightness Down key
218       *
219       * @since 1
220       */
221      HOS_KEY_BRIGHTNESS_DOWN = 41,
222  
223      /**
224       * Indicates general-purpose key 1 on the wearables
225       *
226       * @since 3
227       */
228      HOS_KEY_WEAR_1 = 1001,
229  
230      /**
231       * Keycode constant: '0' key
232       *
233       * @since 1
234       */
235      HOS_KEY_0 = 2000,
236  
237      /**
238       * Keycode constant: '1' key
239       *
240       * @since 1
241       */
242      HOS_KEY_1 = 2001,
243  
244      /**
245       * Keycode constant: '2' key
246       *
247       * @since 1
248       */
249      HOS_KEY_2 = 2002,
250  
251      /**
252       * Keycode constant: '3' key
253       *
254       * @since 1
255       */
256      HOS_KEY_3 = 2003,
257  
258      /**
259       * Keycode constant: '4' key
260       *
261       * @since 1
262       */
263      HOS_KEY_4 = 2004,
264  
265      /**
266       * Keycode constant: '5' key
267       *
268       * @since 1
269       */
270      HOS_KEY_5 = 2005,
271  
272      /**
273       * Keycode constant: '6' key
274       *
275       * @since 1
276       */
277      HOS_KEY_6 = 2006,
278  
279      /**
280       * Keycode constant: '7' key
281       *
282       * @since 1
283       */
284      HOS_KEY_7 = 2007,
285  
286      /**
287       * Keycode constant: '8' key
288       *
289       * @since 1
290       */
291      HOS_KEY_8 = 2008,
292  
293      /**
294       * Keycode constant: '9' key
295       *
296       * @since 1
297       */
298      HOS_KEY_9 = 2009,
299  
300      /**
301       * Keycode constant: '*' key
302       *
303       * @since 1
304       */
305      HOS_KEY_STAR = 2010,
306  
307      /**
308       * Keycode constant: '#' key
309       *
310       * @since 1
311       */
312      HOS_KEY_POUND = 2011,
313  
314      /**
315       * Keycode constant: Directional Pad Up key
316       * <p>The key may also be synthesized from trackball motions.
317       *
318       * @since 1
319       */
320      HOS_KEY_DPAD_UP = 2012,
321  
322      /**
323       * Keycode constant: Directional Pad Down key
324       * <p>The key may also be synthesized from trackball motions.
325       *
326       * @since 1
327       */
328      HOS_KEY_DPAD_DOWN = 2013,
329  
330      /**
331       * Keycode constant: Directional Pad Left key
332       * <p>The key may also be synthesized from trackball motions.
333       *
334       * @since 1
335       */
336      HOS_KEY_DPAD_LEFT = 2014,
337  
338      /**
339       * Keycode constant: Directional Pad Right key
340       * <p>The key may also be synthesized from trackball motions.
341       *
342       * @since 1
343       */
344      HOS_KEY_DPAD_RIGHT = 2015,
345  
346      /**
347       * Keycode constant: Directional Pad Center key
348       * <p>The key may also be synthesized from trackball motions.
349       *
350       * @since 1
351       */
352      HOS_KEY_DPAD_CENTER = 2016,
353  
354      /**
355       * Keycode constant: 'A' key
356       *
357       * @since 1
358       */
359      HOS_KEY_A = 2017,
360  
361      /**
362       * Keycode constant: 'B' key
363       *
364       * @since 1
365       */
366      HOS_KEY_B = 2018,
367  
368      /**
369       * Keycode constant: 'C' key
370       *
371       * @since 1
372       */
373      HOS_KEY_C = 2019,
374  
375      /**
376       * Keycode constant: 'D' key
377       *
378       * @since 1
379       */
380      HOS_KEY_D = 2020,
381  
382      /**
383       * Keycode constant: 'E' key
384       *
385       * @since 1
386       */
387      HOS_KEY_E = 2021,
388  
389      /**
390       * Keycode constant: 'F' key
391       *
392       * @since 1
393       */
394      HOS_KEY_F = 2022,
395  
396      /**
397       * Keycode constant: 'G' key
398       *
399       * @since 1
400       */
401      HOS_KEY_G = 2023,
402  
403      /**
404       * Keycode constant: 'H' key
405       *
406       * @since 1
407       */
408      HOS_KEY_H = 2024,
409  
410      /**
411       * Keycode constant: 'I' key
412       *
413       * @since 1
414       */
415      HOS_KEY_I = 2025,
416  
417      /**
418       * Keycode constant: 'J' key
419       *
420       * @since 1
421       */
422      HOS_KEY_J = 2026,
423  
424      /**
425       * Keycode constant: 'K' key
426       *
427       * @since 1
428       */
429      HOS_KEY_K = 2027,
430  
431      /**
432       * Keycode constant: 'L' key
433       *
434       * @since 1
435       */
436      HOS_KEY_L = 2028,
437  
438      /**
439       * Keycode constant: 'M' key
440       *
441       * @since 1
442       */
443      HOS_KEY_M = 2029,
444  
445      /**
446       * Keycode constant: 'N' key
447       *
448       * @since 1
449       */
450      HOS_KEY_N = 2030,
451  
452      /**
453       * Keycode constant: 'O' key
454       *
455       * @since 1
456       */
457      HOS_KEY_O = 2031,
458  
459      /**
460       * Keycode constant: 'P' key
461       *
462       * @since 1
463       */
464      HOS_KEY_P = 2032,
465  
466      /**
467       * Keycode constant: 'Q' key
468       *
469       * @since 1
470       */
471      HOS_KEY_Q = 2033,
472  
473      /**
474       * Keycode constant: 'R' key
475       *
476       * @since 1
477       */
478      HOS_KEY_R = 2034,
479  
480      /**
481       * Keycode constant: 'S' key
482       *
483       * @since 1
484       */
485      HOS_KEY_S = 2035,
486  
487      /**
488       * Keycode constant: 'T' key
489       *
490       * @since 1
491       */
492      HOS_KEY_T = 2036,
493  
494      /**
495       * Keycode constant: 'U' key
496       *
497       * @since 1
498       */
499      HOS_KEY_U = 2037,
500  
501      /**
502       * Keycode constant: 'V' key
503       *
504       * @since 1
505       */
506      HOS_KEY_V = 2038,
507  
508      /**
509       * Keycode constant: 'W' key
510       *
511       * @since 1
512       */
513      HOS_KEY_W = 2039,
514  
515      /**
516       * Keycode constant: 'X' key
517       *
518       * @since 1
519       */
520      HOS_KEY_X = 2040,
521  
522      /**
523       * Keycode constant: 'Y' key
524       *
525       * @since 1
526       */
527      HOS_KEY_Y = 2041,
528  
529      /**
530       * Keycode constant: 'Z' key
531       *
532       * @since 1
533       */
534      HOS_KEY_Z = 2042,
535  
536      /**
537       * Keycode constant: ',' key
538       *
539       * @since 1
540       */
541      HOS_KEY_COMMA = 2043,
542  
543      /**
544       * Keycode constant: '.' key
545       *
546       * @since 1
547       */
548      HOS_KEY_PERIOD = 2044,
549  
550      /**
551       * Keycode constant: Left Alt modifier key
552       *
553       * @since 1
554       */
555      HOS_KEY_ALT_LEFT = 2045,
556  
557      /**
558       * Keycode constant: Right Alt modifier key
559       *
560       * @since 1
561       */
562      HOS_KEY_ALT_RIGHT = 2046,
563  
564      /**
565       * Keycode constant: Left Shift modifier key
566       *
567       * @since 1
568       */
569      HOS_KEY_SHIFT_LEFT = 2047,
570  
571      /**
572       * Keycode constant: Right Shift modifier key
573       *
574       * @since 1
575       */
576      HOS_KEY_SHIFT_RIGHT = 2048,
577  
578      /**
579       * Keycode constant: Tab key
580       *
581       * @since 1
582       */
583      HOS_KEY_TAB = 2049,
584  
585      /**
586       * Keycode constant: Space key
587       *
588       * @since 1
589       */
590      HOS_KEY_SPACE = 2050,
591  
592      /**
593       * Keycode constant: Symbol modifier key
594       * <p>The key is used to input alternate symbols.
595       *
596       * @since 1
597       */
598      HOS_KEY_SYM = 2051,
599  
600      /**
601       * Keycode constant: Explorer function key
602       * <p>This key is used to launch a browser application.
603       *
604       * @since 1
605       */
606      HOS_KEY_EXPLORER = 2052,
607  
608      /**
609       * Keycode constant: Email function key
610       * <p>This key is used to launch an email application.
611       *
612       * @since 1
613       */
614      HOS_KEY_ENVELOPE = 2053,
615  
616      /**
617       * Keycode constant: Enter key
618       *
619       * @since 1
620       */
621      HOS_KEY_ENTER = 2054,
622  
623      /**
624       * Keycode constant: Backspace key
625       * <p>Unlike {@link #KEY_FORWARD_DEL}, this key is used to delete characters before the
626       * insertion point.
627       *
628       * @since 1
629       */
630      HOS_KEY_DEL = 2055,
631  
632      /**
633       * Keycode constant: '`' key (backtick key)
634       *
635       * @since 1
636       */
637      HOS_KEY_GRAVE = 2056,
638  
639      /**
640       * Keycode constant: '-' key
641       *
642       * @since 1
643       */
644      HOS_KEY_MINUS = 2057,
645  
646      /**
647       * Keycode constant: '=' key
648       *
649       * @since 1
650       */
651      HOS_KEY_EQUALS = 2058,
652  
653      /**
654       * Keycode constant: '[' key
655       *
656       * @since 1
657       */
658      HOS_KEY_LEFT_BRACKET = 2059,
659  
660      /**
661       * Keycode constant: ']' key
662       *
663       * @since 1
664       */
665      HOS_KEY_RIGHT_BRACKET = 2060,
666  
667      /**
668       * Keycode constant: '\' key
669       *
670       * @since 1
671       */
672      HOS_KEY_BACKSLASH = 2061,
673  
674      /**
675       * Keycode constant: ',' key
676       *
677       * @since 1
678       */
679      HOS_KEY_SEMICOLON = 2062,
680  
681      /**
682       * Keycode constant: ''' key (apostrophe key)
683       *
684       * @since 1
685       */
686      HOS_KEY_APOSTROPHE = 2063,
687  
688      /**
689       * Keycode constant: '/' key
690       *
691       * @since 1
692       */
693      HOS_KEY_SLASH = 2064,
694  
695      /**
696       * Keycode constant: '{@literal @}' key
697       *
698       * @since 1
699       */
700      HOS_KEY_AT = 2065,
701  
702      /**
703       * Keycode constant: '+' key
704       *
705       * @since 1
706       */
707      HOS_KEY_PLUS = 2066,
708  
709      /**
710       * Keycode constant: Menu key
711       *
712       * @since 1
713       */
714      HOS_KEY_MENU = 2067,
715  
716      /**
717       * Keycode constant: Page Up key
718       *
719       * @since 1
720       */
721      HOS_KEY_PAGE_UP = 2068,
722  
723      /**
724       * Keycode constant: Page Down key
725       *
726       * @since 1
727       */
728      HOS_KEY_PAGE_DOWN = 2069,
729  
730      /**
731       * Keycode constant: Escape key
732       *
733       * @since 1
734       */
735      HOS_KEY_ESCAPE = 2070,
736  
737      /**
738       * Keycode constant: Forward Delete key
739       * <p>Unlike {@link #KEY_DEL}, this key is used to delete characters ahead of the insertion
740       * point.
741       *
742       * @since 1
743       */
744      HOS_KEY_FORWARD_DEL = 2071,
745  
746      /**
747       * Keycode constant: Left Control modifier key
748       *
749       * @since 1
750       */
751      HOS_KEY_CTRL_LEFT = 2072,
752  
753      /**
754       * Keycode constant: Right Control modifier key
755       *
756       * @since 1
757       */
758      HOS_KEY_CTRL_RIGHT = 2073,
759  
760      /**
761       * Keycode constant: Caps Lock key
762       *
763       * @since 1
764       */
765      HOS_KEY_CAPS_LOCK = 2074,
766  
767      /**
768       * Keycode constant: Scroll Lock key
769       *
770       * @since 1
771       */
772      HOS_KEY_SCROLL_LOCK = 2075,
773  
774      /**
775       * Keycode constant: Left Meta modifier key
776       *
777       * @since 1
778       */
779      HOS_KEY_META_LEFT = 2076,
780  
781      /**
782       * Keycode constant: Right Meta modifier key
783       *
784       * @since 1
785       */
786      HOS_KEY_META_RIGHT = 2077,
787  
788      /**
789       * Keycode constant: Function modifier key
790       *
791       * @since 1
792       */
793      HOS_KEY_FUNCTION = 2078,
794  
795      /**
796       * Keycode constant: System Request/Print Screen key
797       *
798       * @since 1
799       */
800      HOS_KEY_SYSRQ = 2079,
801  
802      /**
803       * Keycode constant: Break/Pause key
804       *
805       * @since 1
806       */
807      HOS_KEY_BREAK = 2080,
808  
809      /**
810       * Keycode constant: Home Movement key
811       * <p>This key is used to scroll or move the cursor around to the start of a line or to the
812       * top of a list.
813       *
814       * @since 1
815       */
816      HOS_KEY_MOVE_HOME = 2081,
817  
818      /**
819       * Keycode constant: End Movement key
820       * <p>This key is used to scroll or move the cursor around to the end of a line or to the
821       * bottom of a list.
822       *
823       * @since 1
824       */
825      HOS_KEY_MOVE_END = 2082,
826  
827      /**
828       * Keycode constant: Insert key
829       * <p>This key is used to toggle the insert or overwrite edit mode.
830       *
831       * @since 1
832       */
833      HOS_KEY_INSERT = 2083,
834  
835      /**
836       * Keycode constant: Forward key
837       * <p>This key is used to navigate forward in the history stack. It is a complement of
838       * {@link #KEY_BACK}.
839       *
840       * @since 1
841       */
842      HOS_KEY_FORWARD = 2084,
843  
844      /**
845       * Keycode constant: Play media key
846       *
847       * @since 1
848       */
849      HOS_KEY_MEDIA_PLAY = 2085,
850  
851      /**
852       * Keycode constant: Pause media key
853       *
854       * @since 1
855       */
856      HOS_KEY_MEDIA_PAUSE = 2086,
857  
858      /**
859       * Keycode constant: Close media key
860       * <p>This key can be used to close a CD tray, for example.
861       *
862       * @since 1
863       */
864      HOS_KEY_MEDIA_CLOSE = 2087,
865  
866      /**
867       * Keycode constant: Eject media key
868       * <p>This key can be used to eject a CD tray, for example.
869       *
870       * @since 1
871       */
872      HOS_KEY_MEDIA_EJECT = 2088,
873  
874      /**
875       * Keycode constant: Record media key
876       *
877       * @since 1
878       */
879      HOS_KEY_MEDIA_RECORD = 2089,
880  
881      /**
882       * Keycode constant: F1 key
883       *
884       * @since 1
885       */
886      HOS_KEY_F1 = 2090,
887  
888      /**
889       * Keycode constant: F2 key
890       *
891       * @since 1
892       */
893      HOS_KEY_F2 = 2091,
894  
895      /**
896       * Keycode constant: F3 key
897       *
898       * @since 1
899       */
900      HOS_KEY_F3 = 2092,
901  
902      /**
903       * Keycode constant: F4 key
904       *
905       * @since 1
906       */
907      HOS_KEY_F4 = 2093,
908  
909      /**
910       * Keycode constant: F5 key
911       *
912       * @since 1
913       */
914      HOS_KEY_F5 = 2094,
915  
916      /**
917       * Keycode constant: F6 key
918       *
919       * @since 1
920       */
921      HOS_KEY_F6 = 2095,
922  
923      /**
924       * Keycode constant: F7 key
925       *
926       * @since 1
927       */
928      HOS_KEY_F7 = 2096,
929  
930      /**
931       * Keycode constant: F8 key
932       *
933       * @since 1
934       */
935      HOS_KEY_F8 = 2097,
936  
937      /**
938       * Keycode constant: F9 key
939       *
940       * @since 1
941       */
942      HOS_KEY_F9 = 2098,
943  
944      /**
945       * Keycode constant: F10 key
946       *
947       * @since 1
948       */
949      HOS_KEY_F10 = 2099,
950  
951      /**
952       * Keycode constant: F11 key
953       *
954       * @since 1
955       */
956      HOS_KEY_F11 = 2100,
957  
958      /**
959       * Keycode constant: F12 key
960       *
961       * @since 1
962       */
963      HOS_KEY_F12 = 2101,
964  
965      /**
966       * Keycode constant: Num Lock key
967       * <p>This key is used to alter the behavior of other keys on the numeric keypad.
968       *
969       * @since 1
970       */
971      HOS_KEY_NUM_LOCK = 2102,
972  
973      /**
974       * Keycode constant: '0' key on the numeric keypad
975       *
976       * @since 1
977       */
978      HOS_KEY_NUMPAD_0 = 2103,
979  
980      /**
981       * Keycode constant: '1' key on the numeric keypad
982       *
983       * @since 1
984       */
985      HOS_KEY_NUMPAD_1 = 2104,
986  
987      /**
988       * Keycode constant: '2' key on the numeric keypad
989       *
990       * @since 1
991       */
992      HOS_KEY_NUMPAD_2 = 2105,
993  
994      /**
995       * Keycode constant: '3' key on the numeric keypad
996       *
997       * @since 1
998       */
999      HOS_KEY_NUMPAD_3 = 2106,
1000  
1001      /**
1002       * Keycode constant: '4' key on the numeric keypad
1003       *
1004       * @since 1
1005       */
1006      HOS_KEY_NUMPAD_4 = 2107,
1007  
1008      /**
1009       * Keycode constant: '5' key on the numeric keypad
1010       *
1011       * @since 1
1012       */
1013      HOS_KEY_NUMPAD_5 = 2108,
1014  
1015      /**
1016       * Keycode constant: '6' key on the numeric keypad
1017       *
1018       * @since 1
1019       */
1020      HOS_KEY_NUMPAD_6 = 2109,
1021  
1022      /**
1023       * Keycode constant: '7' key on the numeric keypad
1024       *
1025       * @since 1
1026       */
1027      HOS_KEY_NUMPAD_7 = 2110,
1028  
1029      /**
1030       * Keycode constant: '8' key on the numeric keypad
1031       *
1032       * @since 1
1033       */
1034      HOS_KEY_NUMPAD_8 = 2111,
1035  
1036      /**
1037       * Keycode constant: '9' key on the numeric keypad
1038       *
1039       * @since 1
1040       */
1041      HOS_KEY_NUMPAD_9 = 2112,
1042  
1043      /**
1044       * Keycode constant: '/' key (for division) on the numeric keypad
1045       *
1046       * @since 1
1047       */
1048      HOS_KEY_NUMPAD_DIVIDE = 2113,
1049  
1050      /**
1051       * Keycode constant: '*' key (for multiplication) on the numeric keypad
1052       *
1053       * @since 1
1054       */
1055      HOS_KEY_NUMPAD_MULTIPLY = 2114,
1056  
1057      /**
1058       * Keycode constant: '-' key (for subtraction) on the numeric keypad
1059       *
1060       * @since 1
1061       */
1062      HOS_KEY_NUMPAD_SUBTRACT = 2115,
1063  
1064      /**
1065       * Keycode constant: '+' key (for addition) on the numeric keypad
1066       *
1067       * @since 1
1068       */
1069      HOS_KEY_NUMPAD_ADD = 2116,
1070  
1071      /**
1072       * Key code constant: '.' key (for decimals or digit grouping) on the numeric keypad
1073       *
1074       * @since 1
1075       */
1076      HOS_KEY_NUMPAD_DOT = 2117,
1077  
1078      /**
1079       * Key code constant: ',' key (for decimals or digit grouping) on the numeric keypad
1080       *
1081       * @since 1
1082       */
1083      HOS_KEY_NUMPAD_COMMA = 2118,
1084  
1085      /**
1086       * Keycode constant: Enter key on the numeric keypad
1087       *
1088       * @since 1
1089       */
1090      HOS_KEY_NUMPAD_ENTER = 2119,
1091  
1092      /**
1093       * Keycode constant: '=' key on the numeric keypad
1094       *
1095       * @since 1
1096       */
1097      HOS_KEY_NUMPAD_EQUALS = 2120,
1098  
1099      /**
1100       * Keycode constant: '(' key on the numeric keypad
1101       *
1102       * @since 1
1103       */
1104      HOS_KEY_NUMPAD_LEFT_PAREN = 2121,
1105  
1106      /**
1107       * Keycode constant: ')' key on the numeric keypad
1108       *
1109       * @since 1
1110       */
1111      HOS_KEY_NUMPAD_RIGHT_PAREN = 2122,
1112  
1113      /**
1114       * Key code:  The virtual multitask key
1115       *
1116       * @since 1
1117       */
1118      HOS_KEY_VIRTUAL_MULTITASK = 2210,
1119  
1120      HOS_KEY_COMPOSE = 2466,
1121      HOS_KEY_SLEEP = 2600,
1122      HOS_KEY_ZENKAKU_HANKAKU = 2601,
1123      HOS_KEY_102ND = 2602,
1124      HOS_KEY_RO = 2603,
1125      HOS_KEY_KATAKANA = 2604,
1126      HOS_KEY_HIRAGANA = 2605,
1127      HOS_KEY_HENKAN = 2606,
1128      HOS_KEY_KATAKANA_HIRAGANA = 2607,
1129      HOS_KEY_MUHENKAN = 2608,
1130      HOS_KEY_LINEFEED = 2609,
1131      HOS_KEY_MACRO = 2610,
1132      HOS_KEY_NUMPAD_PLUSMINUS = 2611,
1133      HOS_KEY_SCALE = 2612,
1134      HOS_KEY_HANGUEL = 2613,
1135      HOS_KEY_HANJA = 2614,
1136      HOS_KEY_YEN = 2615,
1137      HOS_KEY_STOP = 2616,
1138      HOS_KEY_AGAIN = 2617,
1139      HOS_KEY_PROPS = 2618,
1140      HOS_KEY_UNDO = 2619,
1141      HOS_KEY_COPY = 2620,
1142      HOS_KEY_OPEN = 2621,
1143      HOS_KEY_PASTE = 2622,
1144      HOS_KEY_FIND = 2623,
1145      HOS_KEY_CUT = 2624,
1146      HOS_KEY_HELP = 2625,
1147      HOS_KEY_CALC = 2626,
1148      HOS_KEY_FILE = 2627,
1149      HOS_KEY_BOOKMARKS = 2628,
1150      HOS_KEY_NEXT = 2629,
1151      HOS_KEY_PLAYPAUSE = 2630,
1152      HOS_KEY_PREVIOUS = 2631,
1153      HOS_KEY_STOPCD = 2632,
1154      HOS_KEY_CONFIG = 2634,
1155      HOS_KEY_REFRESH = 2635,
1156      HOS_KEY_EXIT = 2636,
1157      HOS_KEY_EDIT = 2637,
1158      HOS_KEY_SCROLLUP = 2638,
1159      HOS_KEY_SCROLLDOWN = 2639,
1160      HOS_KEY_NEW = 2640,
1161      HOS_KEY_REDO = 2641,
1162      HOS_KEY_CLOSE = 2642,
1163      HOS_KEY_PLAY = 2643,
1164      HOS_KEY_BASSBOOST = 2644,
1165      HOS_KEY_PRINT = 2645,
1166      HOS_KEY_CHAT = 2646,
1167      HOS_KEY_FINANCE = 2647,
1168      HOS_KEY_CANCEL = 2648,
1169      HOS_KEY_KBDILLUM_TOGGLE = 2649,
1170      HOS_KEY_KBDILLUM_DOWN = 2650,
1171      HOS_KEY_KBDILLUM_UP = 2651,
1172      HOS_KEY_SEND = 2652,
1173      HOS_KEY_REPLY = 2653,
1174      HOS_KEY_FORWARDMAIL = 2654,
1175      HOS_KEY_SAVE = 2655,
1176      HOS_KEY_DOCUMENTS = 2656,
1177      HOS_KEY_VIDEO_NEXT = 2657,
1178      HOS_KEY_VIDEO_PREV = 2658,
1179      HOS_KEY_BRIGHTNESS_CYCLE = 2659,
1180      HOS_KEY_BRIGHTNESS_ZERO = 2660,
1181      HOS_KEY_DISPLAY_OFF = 2661,
1182      HOS_BTN_MISC = 2662,
1183      HOS_KEY_GOTO = 2663,
1184      HOS_KEY_INFO = 2664,
1185      HOS_KEY_PROGRAM = 2665,
1186      HOS_KEY_PVR = 2666,
1187      HOS_KEY_SUBTITLE = 2667,
1188      HOS_KEY_FULL_SCREEN = 2668,
1189      HOS_KEY_KEYBOARD = 2669,
1190      HOS_KEY_ASPECT_RATIO = 2670,
1191      HOS_KEY_PC = 2671,
1192      HOS_KEY_TV = 2672,
1193      HOS_KEY_TV2 = 2673,
1194      HOS_KEY_VCR = 2674,
1195      HOS_KEY_VCR2 = 2675,
1196      HOS_KEY_SAT = 2676,
1197      HOS_KEY_CD = 2677,
1198      HOS_KEY_TAPE = 2678,
1199      HOS_KEY_TUNER = 2679,
1200      HOS_KEY_PLAYER = 2680,
1201      HOS_KEY_DVD = 2681,
1202      HOS_KEY_AUDIO = 2682,
1203      HOS_KEY_VIDEO = 2683,
1204      HOS_KEY_MEMO = 2684,
1205      HOS_KEY_CALENDAR = 2685,
1206      HOS_KEY_RED = 2686,
1207      HOS_KEY_GREEN = 2687,
1208      HOS_KEY_YELLOW = 2688,
1209      HOS_KEY_BLUE = 2689,
1210      HOS_KEY_CHANNELUP = 2690,
1211      HOS_KEY_CHANNELDOWN = 2691,
1212      HOS_KEY_LAST = 2692,
1213      HOS_KEY_RESTART = 2693,
1214      HOS_KEY_SLOW = 2694,
1215      HOS_KEY_SHUFFLE = 2695,
1216      HOS_KEY_VIDEOPHONE = 2696,
1217      HOS_KEY_GAMES = 2697,
1218      HOS_KEY_ZOOMIN = 2698,
1219      HOS_KEY_ZOOMOUT = 2699,
1220      HOS_KEY_ZOOMRESET = 2700,
1221      HOS_KEY_WORDPROCESSOR = 2701,
1222      HOS_KEY_EDITOR = 2702,
1223      HOS_KEY_SPREADSHEET = 2703,
1224      HOS_KEY_GRAPHICSEDITOR = 2704,
1225      HOS_KEY_PRESENTATION = 2705,
1226      HOS_KEY_DATABASE = 2706,
1227      HOS_KEY_NEWS = 2707,
1228      HOS_KEY_VOICEMAIL = 2708,
1229      HOS_KEY_ADDRESSBOOK = 2709,
1230      HOS_KEY_MESSENGER = 2710,
1231      HOS_KEY_BRIGHTNESS_TOGGLE = 2711,
1232      HOS_KEY_SPELLCHECK = 2712,
1233      HOS_KEY_COFFEE = 2713,
1234      HOS_KEY_MEDIA_REPEAT = 2714,
1235      HOS_KEY_IMAGES = 2715,
1236      HOS_KEY_BUTTONCONFIG = 2716,
1237      HOS_KEY_TASKMANAGER = 2717,
1238      HOS_KEY_JOURNAL = 2718,
1239      HOS_KEY_CONTROLPANEL = 2719,
1240      HOS_KEY_APPSELECT = 2720,
1241      HOS_KEY_SCREENSAVER = 2721,
1242      HOS_KEY_ASSISTANT = 2722,
1243      HOS_KEY_KBD_LAYOUT_NEXT = 2723,
1244      HOS_KEY_BRIGHTNESS_MIN = 2724,
1245      HOS_KEY_BRIGHTNESS_MAX = 2725,
1246      HOS_KEY_KBDINPUTASSIST_PREV = 2726,
1247      HOS_KEY_KBDINPUTASSIST_NEXT = 2727,
1248      HOS_KEY_KBDINPUTASSIST_PREVGROUP = 2728,
1249      HOS_KEY_KBDINPUTASSIST_NEXTGROUP = 2729,
1250      HOS_KEY_KBDINPUTASSIST_ACCEPT = 2730,
1251      HOS_KEY_KBDINPUTASSIST_CANCEL = 2731,
1252  
1253      HOS_KEY_FRONT = 2800,
1254      HOS_KEY_SETUP = 2801,
1255      HOS_KEY_WAKEUP = 2802,
1256      HOS_KEY_SENDFILE = 2803,
1257      HOS_KEY_DELETEFILE = 2804,
1258      HOS_KEY_XFER = 2805,
1259      HOS_KEY_PROG1 = 2806,
1260      HOS_KEY_PROG2 = 2807,
1261      HOS_KEY_MSDOS = 2808,
1262      HOS_KEY_SCREENLOCK = 2809,
1263      HOS_KEY_DIRECTION_ROTATE_DISPLAY = 2810,
1264      HOS_KEY_CYCLEWINDOWS = 2811,
1265      HOS_KEY_COMPUTER = 2812,
1266      HOS_KEY_EJECTCLOSECD = 2813,
1267      HOS_KEY_ISO = 2814,
1268      HOS_KEY_MOVE = 2815,
1269      HOS_KEY_F13 = 2816,
1270      HOS_KEY_F14 = 2817,
1271      HOS_KEY_F15 = 2818,
1272      HOS_KEY_F16 = 2819,
1273      HOS_KEY_F17 = 2820,
1274      HOS_KEY_F18 = 2821,
1275      HOS_KEY_F19 = 2822,
1276      HOS_KEY_F20 = 2823,
1277      HOS_KEY_F21 = 2824,
1278      HOS_KEY_F22 = 2825,
1279      HOS_KEY_F23 = 2826,
1280      HOS_KEY_F24 = 2827,
1281      HOS_KEY_PROG3 = 2828,
1282      HOS_KEY_PROG4 = 2829,
1283      HOS_KEY_DASHBOARD = 2830,
1284      HOS_KEY_SUSPEND = 2831,
1285      HOS_KEY_HP = 2832,
1286      HOS_KEY_SOUND = 2833,
1287      HOS_KEY_QUESTION = 2834,
1288      HOS_KEY_CONNECT = 2836,
1289      HOS_KEY_SPORT = 2837,
1290      HOS_KEY_SHOP = 2838,
1291      HOS_KEY_ALTERASE = 2839,
1292      HOS_KEY_SWITCHVIDEOMODE = 2841,
1293      HOS_KEY_BATTERY = 2842,
1294      HOS_KEY_BLUETOOTH = 2843,
1295      HOS_KEY_WLAN = 2844,
1296      HOS_KEY_UWB = 2845,
1297      HOS_KEY_WWAN_WIMAX = 2846,
1298      HOS_KEY_RFKILL = 2847,
1299      HOS_KEY_F26 = 2848,
1300      HOS_KEY_F27 = 2849,
1301  
1302      HOS_KEY_CHANNEL = 3001,
1303      HOS_KEY_BTN_0 = 3100,
1304      HOS_KEY_BTN_1 = 3101,
1305      HOS_KEY_BTN_2 = 3102,
1306      HOS_KEY_BTN_3 = 3103,
1307      HOS_KEY_BTN_4 = 3104,
1308      HOS_KEY_BTN_5 = 3105,
1309      HOS_KEY_BTN_6 = 3106,
1310      HOS_KEY_BTN_7 = 3107,
1311      HOS_KEY_BTN_8 = 3108,
1312      HOS_KEY_BTN_9 = 3109,
1313  
1314      HOS_KEY_BRL_DOT1 = 3201,
1315      HOS_KEY_BRL_DOT2 = 3202,
1316      HOS_KEY_BRL_DOT3 = 3203,
1317      HOS_KEY_BRL_DOT4 = 3204,
1318      HOS_KEY_BRL_DOT5 = 3205,
1319      HOS_KEY_BRL_DOT6 = 3206,
1320      HOS_KEY_BRL_DOT7 = 3207,
1321      HOS_KEY_BRL_DOT8 = 3208,
1322      HOS_KEY_BRL_DOT9 = 3209,
1323      HOS_KEY_BRL_DOT10 = 3210,
1324  
1325      /**
1326       * Left Knob roll-up
1327       * <p>In contrast to {@link #KEY_LEFT_KNOB_ROLL_DOWN}, it means rolling the left knob upwards. The knob function
1328       * is scenario-specific, for example, increasing the volume or air conditioner temperature.
1329       *
1330       * @since 1
1331       */
1332      HOS_KEY_LEFT_KNOB_ROLL_UP = 10001,
1333  
1334      /**
1335       * Left Knob roll-down
1336       * <p>In contrast to {@link #KEY_LEFT_KNOB_ROLL_UP}, it means rolling the left knob downwards. The knob function
1337       * is scenario-specific, for example, reducing the volume or air conditioner temperature.
1338       *
1339       * @since 1
1340       */
1341      HOS_KEY_LEFT_KNOB_ROLL_DOWN = 10002,
1342  
1343      /**
1344       * Left Knob
1345       * <p>Pressing the knob will activate its adjustment function.
1346       *
1347       * @since 1
1348       */
1349      HOS_KEY_LEFT_KNOB = 10003,
1350  
1351      /**
1352       * Right Knob roll-up
1353       * <p>In contrast to {@link #KEY_RIGHT_KNOB_ROLL_DOWN}, it means rolling the right knob upwards. The knob
1354       * function is scenario-specific, for example, increasing the volume or air conditioner temperature.
1355       *
1356       * @since 1
1357       */
1358      HOS_KEY_RIGHT_KNOB_ROLL_UP = 10004,
1359  
1360      /**
1361       * Right Knob roll-down
1362       * <p>In contrast to {@link #KEY_RIGHT_KNOB_ROLL_UP}, it means rolling the right knob downwards. The knob
1363       * function is scenario-specific, for example, reducing the volume or air conditioner temperature.
1364       *
1365       * @since 1
1366       */
1367      HOS_KEY_RIGHT_KNOB_ROLL_DOWN = 10005,
1368  
1369      /**
1370       * Right Knob
1371       * <p>Pressing the knob will activate its adjustment function.
1372       *
1373       * @since 1
1374       */
1375      HOS_KEY_RIGHT_KNOB = 10006,
1376  
1377      /**
1378       * Audio Source Switch button
1379       * <p>Pressing this button will enable the audio source. Depending on the actual scenario, it may also
1380       * indicate that the Bluetooth call control button is pressed.
1381       *
1382       * @since 1
1383       */
1384      HOS_KEY_VOICE_SOURCE_SWITCH = 10007,
1385  
1386      /**
1387       * Menu key
1388       * <p>Pressing this key will display the launcher page.
1389       *
1390       * @since 1
1391       */
1392      HOS_KEY_LAUNCHER_MENU = 10008,
1393  
1394      /**
1395       * Keycode constant: max keycode
1396       * <p> If a new keycode added to {@code KeyEvent} is greater than the maximum keycode, update
1397       * the maximum keycode accordingly.
1398       *
1399       * @since 1
1400       */
1401      HOS_NOW_MAX_KEY = HOS_KEY_LAUNCHER_MENU
1402  };
1403  
1404  enum MouseEnum {
1405      /**
1406       * Indicates that the left button on the mouse is pressed.
1407       *
1408       * @since 1
1409       */
1410      HOS_LEFT_BUTTON = 1 << 0,
1411  
1412      /**
1413       * Indicates that the right button on the mouse is pressed.
1414       *
1415       * @since 1
1416       */
1417      HOS_RIGHT_BUTTON = 1 << 1,
1418  
1419      /**
1420       * Indicates that the middle button on the mouse is pressed.
1421       *
1422       * @since 1
1423       */
1424      HOS_MIDDLE_BUTTON = 1 << 2,
1425  
1426      /**
1427       * Indicates that the back button on the mouse is pressed.
1428       *
1429       * @since 1
1430       */
1431      HOS_BACK_BUTTON = 1 << 3,
1432  
1433      /**
1434       * Indicates that the forward button on the mouse is pressed.
1435       *
1436       * @since 1
1437       */
1438      HOS_FORWARD_BUTTON = 1 << 4,
1439  
1440      HOS_SIDE_BUTTON = 1 << 5,
1441      HOS_EXTRA_BUTTON = 1 << 6,
1442      HOS_TASK_BUTTON = 1 << 7,
1443  };
1444  
1445  enum JoystickEnum {
1446      /**
1447       * Key code of joystick:
1448       *
1449       * @since 1
1450       */
1451      HOS_KEY_BUTTON_TRIGGER = 2401,
1452  
1453      /**
1454       * Key code of joystick:
1455       *
1456       * @since 1
1457       */
1458      HOS_KEY_BUTTON_THUMB = 2402,
1459  
1460      /**
1461       * Key code of joystick:
1462       *
1463       * @since 1
1464       */
1465      HOS_KEY_BUTTON_THUMB2 = 2403,
1466  
1467      /**
1468       * Key code of joystick:
1469       *
1470       * @since 1
1471       */
1472      HOS_KEY_BUTTON_TOP = 2404,
1473  
1474      /**
1475       * Key code of joystick:
1476       *
1477       * @since 1
1478       */
1479      HOS_KEY_BUTTON_TOP2 = 2405,
1480  
1481      /**
1482       * Key code of joystick:
1483       *
1484       * @since 1
1485       */
1486      HOS_KEY_BUTTON_PINKIE = 2406,
1487  
1488      /**
1489       * Key code of joystick:
1490       *
1491       * @since 1
1492       */
1493      HOS_KEY_BUTTON_BASE1 = 2407,
1494  
1495      /**
1496       * Key code of joystick:
1497       *
1498       * @since 1
1499       */
1500      HOS_KEY_BUTTON_BASE2 = 2408,
1501  
1502      /**
1503       * Key code of joystick:
1504       *
1505       * @since 1
1506       */
1507      HOS_KEY_BUTTON_BASE3 = 2409,
1508  
1509      /**
1510       * Key code of joystick:
1511       *
1512       * @since 1
1513       */
1514      HOS_KEY_BUTTON_BASE4 = 2410,
1515  
1516      /**
1517       * Key code of joystick:
1518       *
1519       * @since 1
1520       */
1521      HOS_KEY_BUTTON_BASE5 = 2411,
1522  
1523      /**
1524       * Key code of joystick:
1525       *
1526       * @since 1
1527       */
1528      HOS_KEY_BUTTON_BASE6 = 2412,
1529  
1530      /**
1531       * Key code of joystick:
1532       *
1533       * @since 1
1534       */
1535      HOS_KEY_BUTTON_BASE7 = 2413,
1536  
1537      /**
1538       * Key code of joystick:
1539       *
1540       * @since 1
1541       */
1542      HOS_KEY_BUTTON_BASE8 = 2414,
1543  
1544      /**
1545       * Key code of joystick:
1546       *
1547       * @since 1
1548       */
1549      HOS_KEY_BUTTON_BASE9 = 2415,
1550  
1551      /**
1552       * Key code of joystick:
1553       *
1554       * @since 1
1555       */
1556      HOS_KEY_BUTTON_DEAD = 2416,
1557  };
1558  
1559  enum HandleEnum {
1560      /**
1561       * Key code of handle:
1562       *
1563       * @since 1
1564       */
1565      HOS_KEY_BUTTON_A = 2301,
1566  
1567      /**
1568       * Key code of handle:
1569       *
1570       * @since 1
1571       */
1572      HOS_KEY_BUTTON_B = 2302,
1573  
1574      /**
1575       * Key code of handle:
1576       *
1577       * @since 1
1578       */
1579      HOS_KEY_BUTTON_C = 2303,
1580  
1581      /**
1582       * Key code of handle:
1583       *
1584       * @since 1
1585       */
1586      HOS_KEY_BUTTON_X = 2304,
1587  
1588      /**
1589       * Key code of handle:
1590       *
1591       * @since 1
1592       */
1593      HOS_KEY_BUTTON_Y = 2305,
1594  
1595      /**
1596       * Key code of handle:
1597       *
1598       * @since 1
1599       */
1600      HOS_KEY_BUTTON_Z = 2306,
1601  
1602      /**
1603       * Key code of handle:
1604       *
1605       * @since 1
1606       */
1607      HOS_KEY_BUTTON_L1 = 2307,
1608  
1609      /**
1610       * Key code of handle:
1611       *
1612       * @since 1
1613       */
1614      HOS_KEY_BUTTON_R1 = 2308,
1615  
1616      /**
1617       * Key code of handle:
1618       *
1619       * @since 1
1620       */
1621      HOS_KEY_BUTTON_L2 = 2309,
1622  
1623      /**
1624       * Key code of handle:
1625       *
1626       * @since 1
1627       */
1628      HOS_KEY_BUTTON_R2 = 2310,
1629  
1630      /**
1631       * Key code of handle:
1632       *
1633       * @since 1
1634       */
1635      HOS_KEY_BUTTON_SELECT = 2311,
1636  
1637      /**
1638       * Key code of handle:
1639       *
1640       * @since 1
1641       */
1642      HOS_KEY_BUTTON_START = 2312,
1643  
1644      /**
1645       * Key code of handle:
1646       *
1647       * @since 1
1648       */
1649      HOS_KEY_BUTTON_MODE = 2313,
1650  
1651      /**
1652       * Key code of handle:
1653       *
1654       * @since 1
1655       */
1656      HOS_KEY_BUTTON_THUMBL = 2314,
1657  
1658      /**
1659       * Key code of handle:
1660       *
1661       * @since 1
1662       */
1663      HOS_KEY_BUTTON_THUMBR = 2315,
1664  };
1665  
1666  enum TouchEnum {
1667      /**
1668       * Key code of touch:
1669       *
1670       * @since 1
1671       */
1672      HOS_BUTTON_TOUCH = 2500,
1673  
1674      HOS_BUTTON_TOOL_PEN = 2501,
1675      HOS_BUTTON_TOOL_RUBBER = 2502,
1676      HOS_BUTTON_TOOL_BRUSH = 2503,
1677      HOS_BUTTON_TOOL_PENCIL = 2504,
1678      HOS_BUTTON_TOOL_AIRBRUSH = 2505,
1679      HOS_BUTTON_TOOL_FINGER = 2506,
1680      HOS_BUTTON_TOOL_MOUSE = 2507,
1681      HOS_BUTTON_TOOL_LENS = 2508,
1682      HOS_BUTTON_STYLUS = 2509,
1683      HOS_BUTTON_STYLUS2 = 2510,
1684      HOS_BUTTON_STYLUS3 = 2511,
1685      HOS_BUTTON_TOOL_DOUBLETAP = 2512,
1686      HOS_BUTTON_TOOL_TRIPLETAP = 2513,
1687      HOS_BUTTON_TOOL_QUADTAP = 2514,
1688      HOS_BUTTON_TOOL_QUINTTAP = 2515,
1689  };
1690  } // namespace OHOS
1691  #endif // HOS_KEY_EVENT_H