From 225d5b3848fae3c074d7b1f3711b2aea9f67ed7a Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 8 Nov 2020 02:43:04 +0100 Subject: [PATCH] Fix minor keybinding bug in web client. --- 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 b51fc01..ab3ce34 100644 --- a/new2/rogue_chat_nocanvas_monochrome.html +++ b/new2/rogue_chat_nocanvas_monochrome.html @@ -708,9 +708,9 @@ tui.inputEl.addEventListener('keydown', (event) => { let [tokens, token_starts] = parser.tokenize(tui.inputEl.value); if (tokens.length > 0 && tokens[0].length > 0) { if (tui.inputEl.value[0][0] == '/') { - if (tokens[0].slice(1) == 'play' || tokens[0].slice(1) == 'P') { + if (tokens[0].slice(1) == 'play' || tokens[0][1] == tui.keys.switch_to_play) { tui.switch_mode(mode_play); - } else if (tokens[0].slice(1) == 'study' || tokens[0].slice(1) == '?') { + } else if (tokens[0].slice(1) == 'study' || tokens[0][1] == tui.keys.switch_to_study) { tui.switch_mode(mode_study); } else if (tokens[0].slice(1) == 'help') { tui.log_help(); -- 2.30.2