From c4dda73a80b3149ba2b156e18c2598af6dbfdcb3 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Fri, 18 Dec 2020 21:27:49 +0100 Subject: [PATCH] In curses client, add ability to enter certain wide chars. --- rogue_chat_curses.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index caf688a..57c3750 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -1170,6 +1170,7 @@ class TUI: reset_screen_size() self.explorer = YX(0, 0) self.input_ = '' + store_widechar = False input_prompt = '> ' interval = datetime.timedelta(seconds=5) last_ping = datetime.datetime.now() - interval @@ -1204,6 +1205,13 @@ class TUI: keycode = None if len(key) == 1: keycode = ord(key) + # workaround for + if store_widechar: + store_widechar = False + key = bytes([195, keycode]).decode() + if keycode == 195: + store_widechar = True + continue self.show_help = False self.draw_face = False if key == 'KEY_RESIZE': -- 2.30.2