This commit is contained in:
2026-02-07 22:30:51 -05:00
parent bcf248f7dd
commit 64a2ba2751
4 changed files with 17 additions and 80 deletions

View File

@@ -1,32 +0,0 @@
/**
* Centralized keyboard shortcuts hook for PodTUI
* Single handler to prevent conflicts
*/
import { TabId } from "@/components/TabNavigation";
import { useKeyboard, useRenderer } from "@opentui/solid";
import type { Accessor } from "solid-js";
type ShortcutOptions = {
onAction?: (action: string, direction: Direction) => void;
layerDepth: Accessor<number>;
};
export function useAppKeyboard(props: ShortcutOptions) {
const renderer = useRenderer();
// layer depth 0 is tabs, they are oriented
// vertically, all others are vertically
useKeyboard((key) => {
// handle cycle current layer
if (props.layerDepth() == 0) {
let reverse = false;
if (key.shift) {
reverse = true;
}
if (key.name == "tab" || key.name == "down" || key.name == "j") {
}
}
// handle cycle depth
});
}