From: Christian Heller Date: Sun, 8 Nov 2020 01:43:04 +0000 (+0100) Subject: Fix minor keybinding bug in web client. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/copy_structured?a=commitdiff_plain;h=225d5b3848fae3c074d7b1f3711b2aea9f67ed7a;p=plomrogue2-experiments Fix minor keybinding bug in web client. --- 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();