• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 MMI_KEYEVENT_ADAPTER_H
17 #define MMI_KEYEVENT_ADAPTER_H
18 
19 #include <cstdint>
20 
21 namespace OHOS::NWeb {
22 namespace MMIAdapter {
23 class KeyEvent {
24 public:
25     static const int32_t KEYCODE_0;
26     static const int32_t KEYCODE_1;
27     static const int32_t KEYCODE_2;
28     static const int32_t KEYCODE_3;
29     static const int32_t KEYCODE_4;
30     static const int32_t KEYCODE_5;
31     static const int32_t KEYCODE_6;
32     static const int32_t KEYCODE_7;
33     static const int32_t KEYCODE_8;
34     static const int32_t KEYCODE_9;
35     static const int32_t KEYCODE_DPAD_UP;
36     static const int32_t KEYCODE_DPAD_DOWN;
37     static const int32_t KEYCODE_DPAD_LEFT;
38     static const int32_t KEYCODE_DPAD_RIGHT;
39     static const int32_t KEYCODE_A;
40     static const int32_t KEYCODE_B;
41     static const int32_t KEYCODE_C;
42     static const int32_t KEYCODE_D;
43     static const int32_t KEYCODE_E;
44     static const int32_t KEYCODE_F;
45     static const int32_t KEYCODE_G;
46     static const int32_t KEYCODE_H;
47     static const int32_t KEYCODE_I;
48     static const int32_t KEYCODE_J;
49     static const int32_t KEYCODE_K;
50     static const int32_t KEYCODE_L;
51     static const int32_t KEYCODE_M;
52     static const int32_t KEYCODE_N;
53     static const int32_t KEYCODE_O;
54     static const int32_t KEYCODE_P;
55     static const int32_t KEYCODE_Q;
56     static const int32_t KEYCODE_R;
57     static const int32_t KEYCODE_S;
58     static const int32_t KEYCODE_T;
59     static const int32_t KEYCODE_U;
60     static const int32_t KEYCODE_V;
61     static const int32_t KEYCODE_W;
62     static const int32_t KEYCODE_X;
63     static const int32_t KEYCODE_Y;
64     static const int32_t KEYCODE_Z;
65     static const int32_t KEYCODE_COMMA;
66     static const int32_t KEYCODE_PERIOD;
67     static const int32_t KEYCODE_ALT_LEFT;
68     static const int32_t KEYCODE_ALT_RIGHT;
69     static const int32_t KEYCODE_SHIFT_LEFT;
70     static const int32_t KEYCODE_SHIFT_RIGHT;
71     static const int32_t KEYCODE_TAB;
72     static const int32_t KEYCODE_SPACE;
73     static const int32_t KEYCODE_ENTER;
74     static const int32_t KEYCODE_DEL;
75     static const int32_t KEYCODE_GRAVE;
76     static const int32_t KEYCODE_MINUS;
77     static const int32_t KEYCODE_EQUALS;
78     static const int32_t KEYCODE_LEFT_BRACKET;
79     static const int32_t KEYCODE_RIGHT_BRACKET;
80     static const int32_t KEYCODE_BACKSLASH;
81     static const int32_t KEYCODE_SEMICOLON;
82     static const int32_t KEYCODE_APOSTROPHE;
83     static const int32_t KEYCODE_SLASH;
84     static const int32_t KEYCODE_PAGE_UP;
85     static const int32_t KEYCODE_PAGE_DOWN;
86     static const int32_t KEYCODE_ESCAPE;
87     static const int32_t KEYCODE_FORWARD_DEL;
88     static const int32_t KEYCODE_CTRL_LEFT;
89     static const int32_t KEYCODE_CTRL_RIGHT;
90     static const int32_t KEYCODE_CAPS_LOCK;
91     static const int32_t KEYCODE_SCROLL_LOCK;
92     static const int32_t KEYCODE_META_LEFT;
93     static const int32_t KEYCODE_META_RIGHT;
94     static const int32_t KEYCODE_SYSRQ;
95     static const int32_t KEYCODE_BREAK;
96     static const int32_t KEYCODE_MOVE_HOME;
97     static const int32_t KEYCODE_MOVE_END;
98     static const int32_t KEYCODE_INSERT;
99     static const int32_t KEYCODE_F1;
100     static const int32_t KEYCODE_F2;
101     static const int32_t KEYCODE_F3;
102     static const int32_t KEYCODE_F4;
103     static const int32_t KEYCODE_F5;
104     static const int32_t KEYCODE_F6;
105     static const int32_t KEYCODE_F7;
106     static const int32_t KEYCODE_F8;
107     static const int32_t KEYCODE_F9;
108     static const int32_t KEYCODE_F10;
109     static const int32_t KEYCODE_F11;
110     static const int32_t KEYCODE_F12;
111     static const int32_t KEYCODE_NUM_LOCK;
112     static const int32_t KEYCODE_NUMPAD_0;
113     static const int32_t KEYCODE_NUMPAD_1;
114     static const int32_t KEYCODE_NUMPAD_2;
115     static const int32_t KEYCODE_NUMPAD_3;
116     static const int32_t KEYCODE_NUMPAD_4;
117     static const int32_t KEYCODE_NUMPAD_5;
118     static const int32_t KEYCODE_NUMPAD_6;
119     static const int32_t KEYCODE_NUMPAD_7;
120     static const int32_t KEYCODE_NUMPAD_8;
121     static const int32_t KEYCODE_NUMPAD_9;
122     static const int32_t KEYCODE_NUMPAD_DIVIDE;
123     static const int32_t KEYCODE_NUMPAD_MULTIPLY;
124     static const int32_t KEYCODE_NUMPAD_SUBTRACT;
125     static const int32_t KEYCODE_NUMPAD_ADD;
126     static const int32_t KEYCODE_NUMPAD_DOT;
127     static const int32_t KEYCODE_NUMPAD_ENTER;
128 };
129 } // namespace MMIAdapter
130 } // namespace OHOS::NWeb
131 
132 #endif // MMI_KEYEVENT_ADAPTER_H
133