From: Christian Heller Date: Fri, 18 Dec 2020 20:27:49 +0000 (+0100) Subject: In curses client, add ability to enter certain wide chars. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/add_task?a=commitdiff_plain;h=c4dda73a80b3149ba2b156e18c2598af6dbfdcb3;p=plomrogue2 In curses client, add ability to enter certain wide chars. --- 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':