33 lines
876 B
Python
33 lines
876 B
Python
#!/usr/bin/env python
|
|
# License: GPLv3 Copyright: 2021, Kovid Goyal <kovid at kovidgoyal.net>
|
|
|
|
|
|
import sys
|
|
from typing import List
|
|
|
|
OPTIONS = r'''
|
|
--key-mode -m
|
|
default=normal
|
|
type=choices
|
|
choices=normal,application,kitty,unchanged
|
|
The keyboard mode to use when showing keys. :code:`normal` mode is with DECCKM
|
|
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:
|
|
raise SystemExit('This should be reun as kitten show_key')
|
|
|
|
|
|
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
|
|
cd['short_desc'] = help_text
|