Merge branch 'show-key-kitten' of https://github.com/page-down/kitty
This commit is contained in:
commit
65a20a2407
@ -34,7 +34,7 @@ def format_mods(mods: int) -> str:
|
||||
class KeysHandler(Handler):
|
||||
|
||||
def initialize(self) -> None:
|
||||
self.cmd.set_window_title('Kitty extended keyboard protocol demo')
|
||||
self.cmd.set_window_title('kitty extended keyboard protocol demo')
|
||||
self.cmd.set_cursor_visible(False)
|
||||
self.print('Press any keys - Ctrl+C or Ctrl+D will terminate')
|
||||
|
||||
|
||||
@ -62,6 +62,7 @@ reset and :code:`application` mode is with DECCKM set. :code:`kitty` is the full
|
||||
kitty extended keyboard protocol.
|
||||
'''.format
|
||||
help_text = 'Show the codes generated by the terminal for key presses in various keyboard modes'
|
||||
usage = ''
|
||||
|
||||
|
||||
def main(args: List[str]) -> None:
|
||||
@ -80,3 +81,8 @@ def main(args: List[str]) -> None:
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
elif __name__ == '__doc__':
|
||||
cd = sys.cli_docs # type: ignore
|
||||
cd['usage'] = usage
|
||||
cd['options'] = OPTIONS
|
||||
cd['help_text'] = help_text
|
||||
|
||||
10
kitty/key_encoding.py
generated
10
kitty/key_encoding.py
generated
@ -292,14 +292,18 @@ enter_key = KeyEvent(key='ENTER')
|
||||
backspace_key = KeyEvent(key='BACKSPACE')
|
||||
config_mod_map = {
|
||||
'SHIFT': SHIFT,
|
||||
'⇧': SHIFT,
|
||||
'ALT': ALT,
|
||||
'OPTION': ALT,
|
||||
'OPT': ALT,
|
||||
'⌥': ALT,
|
||||
'⌘': SUPER,
|
||||
'CMD': SUPER,
|
||||
'SUPER': SUPER,
|
||||
'CTRL': CTRL,
|
||||
'COMMAND': SUPER,
|
||||
'CMD': SUPER,
|
||||
'⌘': SUPER,
|
||||
'CONTROL': CTRL,
|
||||
'CTRL': CTRL,
|
||||
'⌃': CTRL,
|
||||
'HYPER': HYPER,
|
||||
'META': META,
|
||||
'NUM_LOCK': NUM_LOCK,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user