Add shell and echo app

This commit is contained in:
2025-11-22 23:43:42 +01:00
parent 29a5cacdea
commit 4bf79e358a
10 changed files with 50 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
export const Keycode = {
Enter: 28,
Backspace: 14,
Q: 16,
W: 17,
E: 18,
@@ -28,10 +29,12 @@ export const Keycode = {
M: 50,
".": 52,
"/": 53,
" ": 57,
};
export const RKeycode = {
28: "Enter",
14: "Backspace",
16: "Q",
17: "W",
18: "E",
@@ -60,4 +63,5 @@ export const RKeycode = {
50: "M",
52: ".",
53: "/",
57: " ",
};

View File

@@ -0,0 +1,8 @@
import { kmod_app_run } from "../../kernel/modules/app/app.kmod";
export function oskrnl_app_launcher_run(path: string, args: string) {
if ((globalThis as any).__oskrnl) {
(globalThis as any).__oskrnl.app_args = args;
}
kmod_app_run(path);
}

View File

@@ -1,10 +1,13 @@
import { oskrnl_app_launcher_run } from "./app/launcher";
import { oskrnl_console_log, oskrnl_console_update } from "./console/console";
import { oskrnl_input_onKeyPress } from "./input/input";
export function oskrnl_register() {
(globalThis as any).__oskrnl = {
app_args: "why",
console_log: oskrnl_console_log,
console_update: oskrnl_console_update,
input_onKeyPress: oskrnl_input_onKeyPress,
app_launcher_run: oskrnl_app_launcher_run,
};
}