2015-04-04 09:53:59 -07:00
|
|
|
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
|
|
|
// or more contributor license agreements. See the NOTICE file
|
|
|
|
|
// distributed with this work for additional information
|
|
|
|
|
// regarding copyright ownership. The SFC licenses this file
|
|
|
|
|
// to you under the Apache License, Version 2.0 (the
|
|
|
|
|
// "License"); you may not use this file except in compliance
|
|
|
|
|
// with the License. You may obtain a copy of the License at
|
2014-11-12 19:33:37 +00:00
|
|
|
//
|
2015-04-04 09:53:59 -07:00
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
2014-11-12 19:33:37 +00:00
|
|
|
//
|
2015-04-04 09:53:59 -07:00
|
|
|
// Unless required by applicable law or agreed to in writing,
|
|
|
|
|
// software distributed under the License is distributed on an
|
|
|
|
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
|
// KIND, either express or implied. See the License for the
|
|
|
|
|
// specific language governing permissions and limitations
|
|
|
|
|
// under the License.
|
2012-04-26 00:25:28 +00:00
|
|
|
|
|
|
|
|
goog.provide('webdriver.Key');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Representations of pressable keys that aren't text. These are stored in
|
|
|
|
|
* the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to
|
2017-10-26 23:36:30 -05:00
|
|
|
* http://www.google.com.au/search?&q=unicode+pua&btnK=Search
|
2012-04-26 00:25:28 +00:00
|
|
|
*
|
|
|
|
|
* @enum {string}
|
2018-11-25 15:31:54 +00:00
|
|
|
* @suppress {lintChecks}
|
2012-04-26 00:25:28 +00:00
|
|
|
*/
|
|
|
|
|
webdriver.Key = {
|
|
|
|
|
NULL: '\uE000',
|
|
|
|
|
CANCEL: '\uE001', // ^break
|
|
|
|
|
HELP: '\uE002',
|
|
|
|
|
BACK_SPACE: '\uE003',
|
|
|
|
|
TAB: '\uE004',
|
|
|
|
|
CLEAR: '\uE005',
|
|
|
|
|
RETURN: '\uE006',
|
|
|
|
|
ENTER: '\uE007',
|
|
|
|
|
SHIFT: '\uE008',
|
|
|
|
|
CONTROL: '\uE009',
|
|
|
|
|
ALT: '\uE00A',
|
|
|
|
|
PAUSE: '\uE00B',
|
|
|
|
|
ESCAPE: '\uE00C',
|
|
|
|
|
SPACE: '\uE00D',
|
|
|
|
|
PAGE_UP: '\uE00E',
|
|
|
|
|
PAGE_DOWN: '\uE00F',
|
|
|
|
|
END: '\uE010',
|
|
|
|
|
HOME: '\uE011',
|
|
|
|
|
ARROW_LEFT: '\uE012',
|
|
|
|
|
LEFT: '\uE012',
|
|
|
|
|
ARROW_UP: '\uE013',
|
|
|
|
|
UP: '\uE013',
|
|
|
|
|
ARROW_RIGHT: '\uE014',
|
|
|
|
|
RIGHT: '\uE014',
|
|
|
|
|
ARROW_DOWN: '\uE015',
|
|
|
|
|
DOWN: '\uE015',
|
|
|
|
|
INSERT: '\uE016',
|
|
|
|
|
DELETE: '\uE017',
|
|
|
|
|
SEMICOLON: '\uE018',
|
|
|
|
|
EQUALS: '\uE019',
|
|
|
|
|
|
|
|
|
|
NUMPAD0: '\uE01A', // number pad keys
|
|
|
|
|
NUMPAD1: '\uE01B',
|
|
|
|
|
NUMPAD2: '\uE01C',
|
|
|
|
|
NUMPAD3: '\uE01D',
|
|
|
|
|
NUMPAD4: '\uE01E',
|
|
|
|
|
NUMPAD5: '\uE01F',
|
|
|
|
|
NUMPAD6: '\uE020',
|
|
|
|
|
NUMPAD7: '\uE021',
|
|
|
|
|
NUMPAD8: '\uE022',
|
|
|
|
|
NUMPAD9: '\uE023',
|
|
|
|
|
MULTIPLY: '\uE024',
|
|
|
|
|
ADD: '\uE025',
|
|
|
|
|
SEPARATOR: '\uE026',
|
|
|
|
|
SUBTRACT: '\uE027',
|
|
|
|
|
DECIMAL: '\uE028',
|
|
|
|
|
DIVIDE: '\uE029',
|
|
|
|
|
|
|
|
|
|
F1: '\uE031', // function keys
|
|
|
|
|
F2: '\uE032',
|
|
|
|
|
F3: '\uE033',
|
|
|
|
|
F4: '\uE034',
|
|
|
|
|
F5: '\uE035',
|
|
|
|
|
F6: '\uE036',
|
|
|
|
|
F7: '\uE037',
|
|
|
|
|
F8: '\uE038',
|
|
|
|
|
F9: '\uE039',
|
|
|
|
|
F10: '\uE03A',
|
|
|
|
|
F11: '\uE03B',
|
|
|
|
|
F12: '\uE03C',
|
|
|
|
|
|
|
|
|
|
COMMAND: '\uE03D', // Apple command key
|
|
|
|
|
META: '\uE03D' // alias for Windows key
|
|
|
|
|
};
|