mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 16:58:09 +02:00
Fix pyflakes failures
This commit is contained in:
@@ -764,7 +764,8 @@ def print_shortcut(key_sequence: Iterable[SingleKey], action: KeyAction) -> None
|
|||||||
GLFW_MOD_ALT, GLFW_MOD_CONTROL, GLFW_MOD_SHIFT, GLFW_MOD_SUPER, GLFW_MOD_HYPER, GLFW_MOD_META,
|
GLFW_MOD_ALT, GLFW_MOD_CONTROL, GLFW_MOD_SHIFT, GLFW_MOD_SUPER, GLFW_MOD_HYPER, GLFW_MOD_META,
|
||||||
glfw_get_key_name
|
glfw_get_key_name
|
||||||
)
|
)
|
||||||
mmap = {'shift': GLFW_MOD_SHIFT, 'alt': GLFW_MOD_ALT, 'ctrl': GLFW_MOD_CONTROL, ('cmd' if is_macos else 'super'): GLFW_MOD_SUPER, 'hyper': GLFW_MOD_HYPER, 'meta': GLFW_MOD_META}
|
mmap = {'shift': GLFW_MOD_SHIFT, 'alt': GLFW_MOD_ALT, 'ctrl': GLFW_MOD_CONTROL, ('cmd' if is_macos else 'super'): GLFW_MOD_SUPER,
|
||||||
|
'hyper': GLFW_MOD_HYPER, 'meta': GLFW_MOD_META}
|
||||||
keys = []
|
keys = []
|
||||||
for key_spec in key_sequence:
|
for key_spec in key_sequence:
|
||||||
names = []
|
names = []
|
||||||
|
|||||||
@@ -473,8 +473,8 @@ class TestKeys(BaseTest):
|
|||||||
for text in ('', 'moose'):
|
for text in ('', 'moose'):
|
||||||
ev = KeyEvent(
|
ev = KeyEvent(
|
||||||
type=action, mods=mods, key=key, text=text, shifted_key=shifted_key, alternate_key=alternate_key,
|
type=action, mods=mods, key=key, text=text, shifted_key=shifted_key, alternate_key=alternate_key,
|
||||||
shift=bool(mods & 1), alt=bool(mods & 2), ctrl=bool(mods & 4), super=bool(mods & 8)
|
shift=bool(mods & 1), alt=bool(mods & 2), ctrl=bool(mods & 4), super=bool(mods & 8),
|
||||||
, hyper=bool(mods & 16), meta=bool(mods & 32)
|
hyper=bool(mods & 16), meta=bool(mods & 32)
|
||||||
)
|
)
|
||||||
ec = encode_key_event(ev)
|
ec = encode_key_event(ev)
|
||||||
q = decode_key_event(ec[2:-1], ec[-1])
|
q = decode_key_event(ec[2:-1], ec[-1])
|
||||||
|
|||||||
Reference in New Issue
Block a user