var inputCount: number | null = null;
function handleKey(event: any) {
+ if (["Alt", "Control", "Meta", "Shift"].includes(event.key)) return;
if (event.target.tagName === "INPUT") {
if (event.target.id === "taskName") {
if (event.key == "Enter") return browserUI.addTask(event);
try {
if (event.key == "j") return browserUI.moveCursor(inputCount ?? 1);
if (event.key == "k") return browserUI.moveCursor(-(inputCount ?? 1));
- if (event.key == "J") return browserUI.moveTask(1);
- if (event.key == "K") return browserUI.moveTask(-1);
+ if (event.key == "J") return browserUI.moveTask(inputCount ?? 1);
+ if (event.key == "K") return browserUI.moveTask(-(inputCount ?? 1));
if (event.key == "T") return browserUI.makeTopPriority();
if (event.key == "n") return browserUI.focusTaskNameInput(event);
if (event.key == "c") return browserUI.setState("cancelled");