Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
F4 = Key('')
F5 = Key('')
F6 = Key('')
F7 = Key('')
F8 = Key('')
F9 = Key('')
F10 = Key('')
F11 = Key('')
F12 = Key('')
F13 = Key('')
F14 = Key('')
F15 = Key('')
F16 = Key('')
F17 = Key('')
F18 = Key('')
F19 = Key('')
F20 = Key('')
F21 = Key('')
F22 = Key('')
F23 = Key('')
F24 = Key('')
# Matches any key.
Any = Key('')
# Special
CPRResponse = Key('')
Vt100MouseEvent = Key('')
WindowsMouseEvent = Key('')
BracketedPaste = Key('')
# Key which is ignored. (The key binding for this key should not do
def __init__(self, name):
#: Descriptive way of writing keys in configuration files. e.g.
#: for ``Control-A``.
self.name = name
def __repr__(self):
return '%s(%r)' % (self.__class__.__name__, self.name)
class Keys(object):
Escape = Key('')
ControlA = Key('')
ControlB = Key('')
ControlC = Key('')
ControlD = Key('')
ControlE = Key('')
ControlF = Key('')
ControlG = Key('')
ControlH = Key('')
ControlI = Key('') # Tab
ControlJ = Key('') # Enter
ControlK = Key('')
ControlL = Key('')
ControlM = Key('') # Enter
ControlN = Key('')
ControlO = Key('')
ControlP = Key('')
ControlQ = Key('')
ControlR = Key('')
ControlS = Key('')
Insert = Key('')
Backspace = Key('')
# Aliases.
Tab = ControlI
Enter = ControlJ
# XXX: Actually Enter equals ControlM, not ControlJ,
# However, in prompt_toolkit, we made the mistake of translating
# \r into \n during the input, so everyone is now handling the
# enter key by binding ControlJ.
# From now on, it's better to bind `Keys.Enter` everywhere,
# because that's future compatible, and will still work when we
# stop replacing \r by \n.
F1 = Key('')
F2 = Key('')
F3 = Key('')
F4 = Key('')
F5 = Key('')
F6 = Key('')
F7 = Key('')
F8 = Key('')
F9 = Key('')
F10 = Key('')
F11 = Key('')
F12 = Key('')
F13 = Key('')
F14 = Key('')
F15 = Key('')
F16 = Key('')
F17 = Key('')
ShiftLeft = Key('')
ShiftUp = Key('')
ShiftDown = Key('')
ShiftRight = Key('')
Home = Key('')
End = Key('')
Delete = Key('')
ShiftDelete = Key('')
ControlDelete = Key('')
PageUp = Key('')
PageDown = Key('')
BackTab = Key('') # shift + tab
Insert = Key('')
Backspace = Key('')
# Aliases.
Tab = ControlI
Enter = ControlJ
# XXX: Actually Enter equals ControlM, not ControlJ,
# However, in prompt_toolkit, we made the mistake of translating
# \r into \n during the input, so everyone is now handling the
# enter key by binding ControlJ.
# From now on, it's better to bind `Keys.Enter` everywhere,
# because that's future compatible, and will still work when we
# stop replacing \r by \n.
F1 = Key('')
F2 = Key('')
F3 = Key('')
F6 = Key('')
F7 = Key('')
F8 = Key('')
F9 = Key('')
F10 = Key('')
F11 = Key('')
F12 = Key('')
F13 = Key('')
F14 = Key('')
F15 = Key('')
F16 = Key('')
F17 = Key('')
F18 = Key('')
F19 = Key('')
F20 = Key('')
F21 = Key('')
F22 = Key('')
F23 = Key('')
F24 = Key('')
# Matches any key.
Any = Key('')
# Special
CPRResponse = Key('')
Vt100MouseEvent = Key('')
WindowsMouseEvent = Key('')
BracketedPaste = Key('')
# Key which is ignored. (The key binding for this key should not do
# anything.)
Ignore = Key('')
ControlA = Key('')
ControlB = Key('')
ControlC = Key('')
ControlD = Key('')
ControlE = Key('')
ControlF = Key('')
ControlG = Key('')
ControlH = Key('')
ControlI = Key('') # Tab
ControlJ = Key('') # Enter
ControlK = Key('')
ControlL = Key('')
ControlM = Key('') # Enter
ControlN = Key('')
ControlO = Key('')
ControlP = Key('')
ControlQ = Key('')
ControlR = Key('')
ControlS = Key('')
ControlT = Key('')
ControlU = Key('')
ControlV = Key('')
ControlW = Key('')
ControlX = Key('')
ControlY = Key('')
ControlZ = Key('')
ControlSpace = Key('')
ControlBackslash = Key('')
ControlSquareClose = Key('')
ControlCircumflex = Key('')
# enter key by binding ControlJ.
# From now on, it's better to bind `Keys.Enter` everywhere,
# because that's future compatible, and will still work when we
# stop replacing \r by \n.
F1 = Key('')
F2 = Key('')
F3 = Key('')
F4 = Key('')
F5 = Key('')
F6 = Key('')
F7 = Key('')
F8 = Key('')
F9 = Key('')
F10 = Key('')
F11 = Key('')
F12 = Key('')
F13 = Key('')
F14 = Key('')
F15 = Key('')
F16 = Key('')
F17 = Key('')
F18 = Key('')
F19 = Key('')
F20 = Key('')
F21 = Key('')
F22 = Key('')
F23 = Key('')
F24 = Key('')
# Matches any key.
ControlDown = Key('')
Up = Key('')
Down = Key('')
Right = Key('')
Left = Key('')
ShiftLeft = Key('')
ShiftUp = Key('')
ShiftDown = Key('')
ShiftRight = Key('')
Home = Key('')
End = Key('')
Delete = Key('')
ShiftDelete = Key('')
ControlDelete = Key('')
PageUp = Key('')
PageDown = Key('')
BackTab = Key('') # shift + tab
Insert = Key('')
Backspace = Key('')
# Aliases.
Tab = ControlI
Enter = ControlJ
# XXX: Actually Enter equals ControlM, not ControlJ,
# However, in prompt_toolkit, we made the mistake of translating
# \r into \n during the input, so everyone is now handling the
# enter key by binding ControlJ.
# From now on, it's better to bind `Keys.Enter` everywhere,
ControlR = Key('')
ControlS = Key('')
ControlT = Key('')
ControlU = Key('')
ControlV = Key('')
ControlW = Key('')
ControlX = Key('')
ControlY = Key('')
ControlZ = Key('')
ControlSpace = Key('')
ControlBackslash = Key('')
ControlSquareClose = Key('')
ControlCircumflex = Key('')
ControlUnderscore = Key('')
ControlLeft = Key('')
ControlRight = Key('')
ControlUp = Key('')
ControlDown = Key('')
Up = Key('')
Down = Key('')
Right = Key('')
Left = Key('')
ShiftLeft = Key('')
ShiftUp = Key('')
ShiftDown = Key('')
ShiftRight = Key('')
Home = Key('')
End = Key('')
# because that's future compatible, and will still work when we
# stop replacing \r by \n.
F1 = Key('')
F2 = Key('')
F3 = Key('')
F4 = Key('')
F5 = Key('')
F6 = Key('')
F7 = Key('')
F8 = Key('')
F9 = Key('')
F10 = Key('')
F11 = Key('')
F12 = Key('')
F13 = Key('')
F14 = Key('')
F15 = Key('')
F16 = Key('')
F17 = Key('')
F18 = Key('')
F19 = Key('')
F20 = Key('')
F21 = Key('')
F22 = Key('')
F23 = Key('')
F24 = Key('')
# Matches any key.
Any = Key('')
# Special