From d3d3e99979a63e73534651aecd912087518b6807 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 29 Jul 2021 08:55:34 +0530 Subject: [PATCH] broadcast kitten: Fix decoding of key events No clue why mypy didnt catch this error --- docs/changelog.rst | 3 +++ kitty/rc/send_text.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 0a9340929..1478ffd0c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -18,6 +18,9 @@ To update |kitty|, :doc:`follow the instructions `. - 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] ---------------------- diff --git a/kitty/rc/send_text.py b/kitty/rc/send_text.py index 917f6ad5e..43f3bcf5b 100644 --- a/kitty/rc/send_text.py +++ b/kitty/rc/send_text.py @@ -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')