a lot of "drunk code", processes need rethinking, terminal initializes but commands dont go through to IO

This commit is contained in:
2026-03-16 18:05:07 +01:00
parent b40fa704c6
commit 18aeeb200f
14 changed files with 322 additions and 42 deletions
+10
View File
@@ -5,6 +5,7 @@
import { initTerminal, isInitializing } from '$lib/stores/terminal/init.svelte';
import { clear, print } from '$lib/stores/terminal/stdio/io';
import type { User } from '$lib/stores/bash/etc/userData';
import { ExitCode } from '$lib/stores/bash/metadata';
const clearTerminal = (): void => clear();
@@ -49,6 +50,15 @@
}
function inputHandler(event: KeyboardEvent) {
const terminalKeyInhibitor = terminal.getKeybindInhibitor();
terminalKeyInhibitor.processKeystroke(event);
const processKeyInhibitor = terminal.getProcessKeyInhibitor();
if(processKeyInhibitor != ExitCode.ERROR) {
processKeyInhibitor.processKeystroke(event);
}
console.log(processKeyInhibitor, terminalKeyInhibitor);
switch (event.key) {
case 'Enter': {
terminal.executeCommand(inputValue);