broadcast kitten: Fix decoding of key events

No clue why mypy didnt catch this error
This commit is contained in:
Kovid Goyal 2021-07-29 08:55:34 +05:30
parent 17ff317d30
commit d3d3e99979
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 2 deletions

View File

@ -18,6 +18,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Allow specifying the previously active tab or the tab to the left/right of
the active tab
- broadcast kitten: Fix a regression in ``0.20.0`` that broke sending of some
keys, such as backspace
0.22.0 [2021-07-26]
----------------------

View File

@ -145,8 +145,8 @@ Do not send text to the active window, even if it is one of the matched windows.
elif encoding == 'base64':
data = base64.standard_b64decode(q)
elif encoding == 'kitty-key':
data = base64.standard_b64decode(q)
data = decode_key_event_as_window_system_key(data)
bdata = base64.standard_b64decode(q)
data = decode_key_event_as_window_system_key(bdata.decode('ascii'))
else:
raise TypeError(f'Invalid encoding for send-text data: {encoding}')
exclude_active = payload_get('exclude_active')