a lot of "drunk code", processes need rethinking, terminal initializes but commands dont go through to IO
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user