X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=new2%2Frogue_chat_nocanvas_monochrome.html;h=bb1ecdaeedb13de65bb93ff2b2bf9dd950bf40f9;hb=77f28624afa28d4ab929b8865e1dfc2e441b7747;hp=a42387f031f08f8906b861779520609a06923b07;hpb=4b5fbf85d84eab0ba0ef4b64039c016b280e36cc;p=plomrogue2-experiments diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html index a42387f..bb1ecda 100644 --- a/new2/rogue_chat_nocanvas_monochrome.html +++ b/new2/rogue_chat_nocanvas_monochrome.html @@ -605,7 +605,7 @@ tui.inputEl.addEventListener('keydown', (event) => { } else if (tui.mode == mode_chat && event.key == 'Enter') { let [tokens, token_starts] = parser.tokenize(tui.inputEl.value); if (tokens.length > 0 && tokens[0].length > 0) { - if (tokens[0][0] == command_char_selector.value) { + if (tui.inputEl.value[0][0] == command_char_selector.value) { if (tokens[0].slice(1) == 'play' || tokens[0].slice(1) == 'p') { tui.switch_mode(mode_play); } else if (tokens[0].slice(1) == 'study' || tokens[0].slice(1) == '?') { @@ -666,6 +666,7 @@ tui.inputEl.addEventListener('keydown', (event) => { }; } else if (tui.mode == mode_study) { if (event.key === 'c') { + event.preventDefault(); tui.switch_mode(mode_chat); } else if (event.key == 'p') { tui.switch_mode(mode_play);