forked from appium/java-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKeyEventMetaModifier.java
More file actions
157 lines (153 loc) · 4.41 KB
/
Copy pathKeyEventMetaModifier.java
File metadata and controls
157 lines (153 loc) · 4.41 KB
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
package io.appium.java_client.android.nativekey;
public enum KeyEventMetaModifier {
/**
* SHIFT key locked in CAPS mode.
* Reserved for use by MetaKeyKeyListener for a published constant in its API.
*/
CAP_LOCKED(0x100),
/**
* ALT key locked.
* Reserved for use by MetaKeyKeyListener for a published constant in its API.
*/
ALT_LOCKED(0x200),
/**
* SYM key locked.
* Reserved for use by MetaKeyKeyListener for a published constant in its API.
*/
SYM_LOCKED(0x400),
/**
* Text is in selection mode.
* Reserved for use by MetaKeyKeyListener for a private unpublished constant
* in its API that is currently being retained for legacy reasons.
*/
SELECTING(0x800),
/**
* This mask is used to check whether one of the ALT meta keys is pressed.
*
* @see AndroidKey#ALT_LEFT
* @see AndroidKey#ALT_RIGHT
*/
ALT_ON(0x02),
/**
* his mask is used to check whether the left ALT meta key is pressed.
*
* @see AndroidKey#ALT_LEFT
*/
ALT_LEFT_ON(0x10),
/**
* This mask is used to check whether the right the ALT meta key is pressed.
*
* @see AndroidKey#ALT_RIGHT
*/
ALT_RIGHT_ON(0x20),
/**
* This mask is used to check whether one of the SHIFT meta keys is pressed.
*
* @see AndroidKey#SHIFT_LEFT
* @see AndroidKey#SHIFT_RIGHT
*/
SHIFT_ON(0x1),
/**
* This mask is used to check whether the left SHIFT meta key is pressed.
*
* @see AndroidKey#SHIFT_LEFT
*/
SHIFT_LEFT_ON(0x40),
/**
* This mask is used to check whether the right SHIFT meta key is pressed.
*
* @see AndroidKey#SHIFT_RIGHT
*/
SHIFT_RIGHT_ON(0x80),
/**
* This mask is used to check whether the SYM meta key is pressed.
*/
SYM_ON(0x4),
/**
* This mask is used to check whether the FUNCTION meta key is pressed.
*/
FUNCTION_ON(0x8),
/**
* This mask is used to check whether one of the CTRL meta keys is pressed.
*
* @see AndroidKey#CTRL_LEFT
* @see AndroidKey#CTRL_RIGHT
*/
CTRL_ON(0x1000),
/**
* This mask is used to check whether the left CTRL meta key is pressed.
*
* @see AndroidKey#CTRL_LEFT
*/
CTRL_LEFT_ON(0x2000),
/**
* This mask is used to check whether the right CTRL meta key is pressed.
*
* @see AndroidKey#CTRL_RIGHT
*/
CTRL_RIGHT_ON(0x4000),
/**
* This mask is used to check whether one of the META meta keys is pressed.
*
* @see AndroidKey#META_LEFT
* @see AndroidKey#META_RIGHT
*/
META_ON(0x10000),
/**
* This mask is used to check whether the left META meta key is pressed.
*
* @see AndroidKey#META_LEFT
*/
META_LEFT_ON(0x20000),
/**
* This mask is used to check whether the right META meta key is pressed.
*
* @see AndroidKey#META_RIGHT
*/
META_RIGHT_ON(0x40000),
/**
* This mask is used to check whether the CAPS LOCK meta key is on.
*
* @see AndroidKey#CAPS_LOCK
*/
CAPS_LOCK_ON(0x100000),
/**
* This mask is used to check whether the NUM LOCK meta key is on.
*
* @see AndroidKey#NUM_LOCK
*/
NUM_LOCK_ON(0x200000),
/**
* This mask is used to check whether the SCROLL LOCK meta key is on.
*
* @see AndroidKey#SCROLL_LOCK
*/
SCROLL_LOCK_ON(0x400000),
/**
* This mask is a combination of {@link #SHIFT_ON}, {@link #SHIFT_LEFT_ON}
* and {@link #SHIFT_RIGHT_ON}.
*/
SHIFT_MASK(SHIFT_ON.getValue() | SHIFT_LEFT_ON.getValue() | SHIFT_RIGHT_ON.getValue()),
/**
* This mask is a combination of {@link #ALT_ON}, {@link #ALT_LEFT_ON}
* and {@link #ALT_RIGHT_ON}.
*/
ALT_MASK(ALT_ON.getValue() | ALT_LEFT_ON.getValue() | ALT_RIGHT_ON.getValue()),
/**
* This mask is a combination of {@link #CTRL_ON}, {@link #CTRL_LEFT_ON}
* and {@link #CTRL_RIGHT_ON}.
*/
CTRL_MASK(CTRL_ON.getValue() | CTRL_LEFT_ON.getValue() | CTRL_RIGHT_ON.getValue()),
/**
* This mask is a combination of {@link #META_ON}, {@link #META_LEFT_ON}
* and {@link #META_RIGHT_ON}.
*/
META_MASK(META_ON.getValue() | META_LEFT_ON .getValue() | META_RIGHT_ON.getValue());
private final int value;
KeyEventMetaModifier(int value) {
this.value = value;
}
public int getValue() {
return value;
}
}