home · contact · privacy
Fix edit mode key retrieval.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 27 Oct 2020 07:02:18 +0000 (08:02 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 27 Oct 2020 07:02:18 +0000 (08:02 +0100)
new2/rogue_chat_nocanvas_monochrome.html

index db7e3037eaeab97c3a0085d70d0d4451411ea31b..bea6f0a7bcb8a3c13107cc2991888cd238875d9c 100644 (file)
@@ -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');