print KeyPress on a new line

This commit is contained in:
Kovid Goyal 2021-07-24 07:02:52 +05:30
parent 41c0343d33
commit b9033d721c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -804,7 +804,8 @@ class Boss:
def report_match(f: Callable) -> None:
if self.args.debug_keyboard:
print(f'\x1b[35m{dispatch_type}\x1b[m matched action:', func_name(f), flush=True)
prefix = '\n' if dispatch_type == 'KeyPress' else ''
print(f'{prefix}\x1b[35m{dispatch_type}\x1b[m matched action:', func_name(f), flush=True)
if key_action is not None:
f = getattr(self, key_action.func, None)