From 26f34308d92c8cd30007feff4a1201b8bf0fb185 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Tue, 27 Oct 2020 08:02:18 +0100
Subject: [PATCH] Fix edit mode key retrieval.

---
 new2/rogue_chat_nocanvas_monochrome.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html
index db7e303..bea6f0a 100644
--- a/new2/rogue_chat_nocanvas_monochrome.html
+++ b/new2/rogue_chat_nocanvas_monochrome.html
@@ -448,10 +448,10 @@ document.addEventListener('keydown', (event) => {
               websocket.send('TASK:MOVE DOWN');
           };
     } else if (tui.mode == 'edit') {
-        if (event.key.length === 1) {
+        if (event.key != "Shift" && event.key.length == 1) {
             websocket.send("TASK:WRITE " + quote(event.key));
+            tui.switch_mode('play');
         }
-        tui.switch_mode('play');
     } else if (tui.mode == 'study') {
         if (event.key === 'c') {
             tui.switch_mode('chat');
-- 
2.30.2