fix: update input flow
This commit is contained in:
@@ -42,6 +42,7 @@ function initKeyboardBridge() {
|
|||||||
const line = buffer;
|
const line = buffer;
|
||||||
buffer = "";
|
buffer = "";
|
||||||
InputModule.submitLocal(line);
|
InputModule.submitLocal(line);
|
||||||
|
InputModule.updateLocalDisplay("");
|
||||||
} else if (e.key === "Escape") {
|
} else if (e.key === "Escape") {
|
||||||
buffer = "";
|
buffer = "";
|
||||||
InputModule.clear();
|
InputModule.clear();
|
||||||
|
|||||||
+2
-2
@@ -3,7 +3,7 @@ const InputModule = {
|
|||||||
localBuffer: "",
|
localBuffer: "",
|
||||||
|
|
||||||
submitLine(text, username) {
|
submitLine(text, username) {
|
||||||
const line = text.trim().toLowerCase();
|
const line = text.trim().toLowerCase().split(/\s+/)[0];
|
||||||
if (!line) return;
|
if (!line) return;
|
||||||
if (introPlaying) return;
|
if (introPlaying) return;
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ const InputModule = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
submitLocal(text) {
|
submitLocal(text) {
|
||||||
const line = text.trim().toLowerCase();
|
const line = text.trim().toLowerCase().split(/\s+/)[0];
|
||||||
if (!line) return;
|
if (!line) return;
|
||||||
if (introPlaying) return;
|
if (introPlaying) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user