import { getContextItem } from "./lib/context.ts"; import { InputManager } from "./lib/input.ts"; import { StateMachine } from "./state/machine.ts"; import { States } from "./state/states/index.ts"; export function bootstrapInputs() { const inputManager = getContextItem("inputManager"); inputManager.onKey("e", () => { const state = getContextItem>("state"); state.transitionTo(States.EDIT_TRACK); }); inputManager.onKey("Delete", () => { if (inputManager.getKeyState("Control")) { localStorage.removeItem("track"); } }); }