Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/javascript/webdriver/key.js
2867 views
1
// Licensed to the Software Freedom Conservancy (SFC) under one
2
// or more contributor license agreements. See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership. The SFC licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License. You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied. See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
goog.provide('webdriver.Key');
19
20
21
/**
22
* Representations of pressable keys that aren't text. These are stored in
23
* the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to
24
* http://www.google.com.au/search?&q=unicode+pua&btnK=Search
25
*
26
* @enum {string}
27
* @suppress {lintChecks}
28
*/
29
webdriver.Key = {
30
NULL: '\uE000',
31
CANCEL: '\uE001', // ^break
32
HELP: '\uE002',
33
BACK_SPACE: '\uE003',
34
TAB: '\uE004',
35
CLEAR: '\uE005',
36
RETURN: '\uE006',
37
ENTER: '\uE007',
38
SHIFT: '\uE008',
39
CONTROL: '\uE009',
40
ALT: '\uE00A',
41
PAUSE: '\uE00B',
42
ESCAPE: '\uE00C',
43
SPACE: '\uE00D',
44
PAGE_UP: '\uE00E',
45
PAGE_DOWN: '\uE00F',
46
END: '\uE010',
47
HOME: '\uE011',
48
ARROW_LEFT: '\uE012',
49
LEFT: '\uE012',
50
ARROW_UP: '\uE013',
51
UP: '\uE013',
52
ARROW_RIGHT: '\uE014',
53
RIGHT: '\uE014',
54
ARROW_DOWN: '\uE015',
55
DOWN: '\uE015',
56
INSERT: '\uE016',
57
DELETE: '\uE017',
58
SEMICOLON: '\uE018',
59
EQUALS: '\uE019',
60
61
NUMPAD0: '\uE01A', // number pad keys
62
NUMPAD1: '\uE01B',
63
NUMPAD2: '\uE01C',
64
NUMPAD3: '\uE01D',
65
NUMPAD4: '\uE01E',
66
NUMPAD5: '\uE01F',
67
NUMPAD6: '\uE020',
68
NUMPAD7: '\uE021',
69
NUMPAD8: '\uE022',
70
NUMPAD9: '\uE023',
71
MULTIPLY: '\uE024',
72
ADD: '\uE025',
73
SEPARATOR: '\uE026',
74
SUBTRACT: '\uE027',
75
DECIMAL: '\uE028',
76
DIVIDE: '\uE029',
77
78
F1: '\uE031', // function keys
79
F2: '\uE032',
80
F3: '\uE033',
81
F4: '\uE034',
82
F5: '\uE035',
83
F6: '\uE036',
84
F7: '\uE037',
85
F8: '\uE038',
86
F9: '\uE039',
87
F10: '\uE03A',
88
F11: '\uE03B',
89
F12: '\uE03C',
90
91
COMMAND: '\uE03D', // Apple command key
92
META: '\uE03D' // alias for Windows key
93
};
94
95