From de938984f8edbb39ddf1fc8062e836baa9ab4465 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 25 Nov 2020 05:28:34 +0100 Subject: [PATCH] Display keyboard control hint in web client. --- rogue_chat.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/rogue_chat.html b/rogue_chat.html index 636773d..c10f7ca 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -11,12 +11,14 @@
terminal rows: -terminal columns: +· terminal columns: +· source code (includes proper terminal/ncurses client)

 
 
-source code (includes proper terminal / curses client) +keyboard input/control: +

button controls for mouse players

@@ -1377,6 +1379,15 @@ window.setInterval(function() { tui.log_msg('@ attempting reconnect …') } }, 5000); +window.setInterval(function() { + let val = "?"; + if (document.activeElement == tui.inputEl) { + val = "on (click outside terminal to change)"; + } else { + val = "off (click into terminal to change)"; + }; + document.getElementById("keyboard_control").textContent = val; +}, 100); document.getElementById("terminal").onclick = function() { tui.inputEl.focus(); }; -- 2.30.2