conjure-os/frontend/src/utils/key-contexts/sidebar-key-context.ts
2025-06-28 21:05:42 -04:00

33 lines
768 B
TypeScript

import { KeyContext } from "./key-context";
import { KeyboardManager } from "../keyboard-manager";
export class SidebarKeyContext extends KeyContext {
readonly name: string = "SidebarContext";
protected onKeyUp() {
super.onKeyUp();
this.store.moveTagUp();
}
protected onKeyDown() {
super.onKeyDown();
this.store.moveTagDown();
}
protected onKeyRight() {
super.onKeyRight();
this.store.moveGameRight();
KeyboardManager.switchContext("carousel")
}
protected onEnter() {
super.onEnter();
this.store.moveGameRight();
KeyboardManager.switchContext("carousel")
}
protected onEscape() {
super.onEscape();
// TODO options menu
}
}