Path: blob/trunk/py/selenium/webdriver/common/keys.py
1864 views
# Licensed to the Software Freedom Conservancy (SFC) under one1# or more contributor license agreements. See the NOTICE file2# distributed with this work for additional information3# regarding copyright ownership. The SFC licenses this file4# to you under the Apache License, Version 2.0 (the5# "License"); you may not use this file except in compliance6# with the License. You may obtain a copy of the License at7#8# http://www.apache.org/licenses/LICENSE-2.09#10# Unless required by applicable law or agreed to in writing,11# software distributed under the License is distributed on an12# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY13# KIND, either express or implied. See the License for the14# specific language governing permissions and limitations15# under the License.1617"""The Keys implementation."""181920class Keys:21"""Set of special key codes for input actions.2223Primarily intended for keyboard usage, but also applied in other contexts24such as Action Chains and IME interactions.25"""2627NULL = "\ue000"28CANCEL = "\ue001" # ^break29HELP = "\ue002"30BACKSPACE = "\ue003"31BACK_SPACE = BACKSPACE32TAB = "\ue004"33CLEAR = "\ue005"34RETURN = "\ue006"35ENTER = "\ue007"36SHIFT = "\ue008"37LEFT_SHIFT = SHIFT38RIGHT_SHIFT = "\ue050"39CONTROL = "\ue009"40LEFT_CONTROL = CONTROL41RIGHT_CONTROL = "\ue051"42ALT = "\ue00a"43LEFT_ALT = ALT44RIGHT_ALT = "\ue052"45PAUSE = "\ue00b"46ESCAPE = "\ue00c"47SPACE = "\ue00d"48PAGE_UP = "\ue00e"49PAGE_DOWN = "\ue00f"50END = "\ue010"51HOME = "\ue011"52LEFT = "\ue012"53ARROW_LEFT = LEFT54UP = "\ue013"55ARROW_UP = UP56RIGHT = "\ue014"57ARROW_RIGHT = RIGHT58DOWN = "\ue015"59ARROW_DOWN = DOWN60INSERT = "\ue016"61DELETE = "\ue017"62SEMICOLON = "\ue018"63EQUALS = "\ue019"6465# Keys representing number pad digits66NUMPAD0 = "\ue01a"67NUMPAD1 = "\ue01b"68NUMPAD2 = "\ue01c"69NUMPAD3 = "\ue01d"70NUMPAD4 = "\ue01e"71NUMPAD5 = "\ue01f"72NUMPAD6 = "\ue020"73NUMPAD7 = "\ue021"74NUMPAD8 = "\ue022"75NUMPAD9 = "\ue023"7677MULTIPLY = "\ue024"78ADD = "\ue025"79SEPARATOR = "\ue026"80SUBTRACT = "\ue027"81DECIMAL = "\ue028"82DIVIDE = "\ue029"8384# Function keys85F1 = "\ue031"86F2 = "\ue032"87F3 = "\ue033"88F4 = "\ue034"89F5 = "\ue035"90F6 = "\ue036"91F7 = "\ue037"92F8 = "\ue038"93F9 = "\ue039"94F10 = "\ue03a"95F11 = "\ue03b"96F12 = "\ue03c"9798META = "\ue03d"99LEFT_META = META100RIGHT_META = "\ue053"101COMMAND = "\ue03d"102LEFT_COMMAND = COMMAND103ZENKAKU_HANKAKU = "\ue040"104105# Extended macOS keys106LEFT_OPTION = LEFT_ALT107RIGHT_OPTION = RIGHT_ALT108109110