X-Git-Url: https://plomlompom.com/repos/day_todos?a=blobdiff_plain;f=rogue_chat.html;h=23626cf7503a91a5aeaa527b39f48cae1adfa698;hb=03caeafc19a0c9a0c48fb667139c0b1726644f40;hp=31a85a56d3d45e787b7f6d11f92b9fc6ecdac4df;hpb=a71fecca672cf691e10c4b56dd70c738bf0e0a98;p=plomrogue2
diff --git a/rogue_chat.html b/rogue_chat.html
index 31a85a5..23626cf 100644
--- a/rogue_chat.html
+++ b/rogue_chat.html
@@ -14,8 +14,10 @@ terminal rows:
/ terminal columns:
/ source code (includes proper terminal/ncurses client)
+
button controls for hard-to-remember keybindings
@@ -970,7 +972,7 @@ let tui = {
recalc_input_lines: function() {
if (this.mode.has_input_prompt) {
let _ = null;
- [this.input_lines, _] = this.msg_into_lines_of_width(this.input_prompt + this.inputEl.value, this.window_width);
+ [this.input_lines, _] = this.msg_into_lines_of_width(this.input_prompt + this.inputEl.value + 'â', this.window_width);
} else {
this.input_lines = [];
}
@@ -1554,7 +1556,7 @@ document.onclick = function() {
};
tui.inputEl.addEventListener('keydown', (event) => {
tui.show_help = false;
- if (event.key == 'Enter') {
+ if (['Enter', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {
event.preventDefault();
}
if ((!tui.mode.is_intro && event.key == 'Escape')
@@ -1750,10 +1752,7 @@ window.setInterval(function() {
}, 1000);
window.setInterval(function() {
if (document.activeElement.tagName.toLowerCase() != 'input') {
- const scroll_x = window.scrollX;
- const scroll_y = window.scrollY;
tui.inputEl.focus();
- window.scrollTo(scroll_x, scroll_y);
};
}, 100);
document.getElementById("help").onclick = function() {