}
input.value = "";
if (event.getModifierState("Control")) {
- this.setPriority(task, null, document.getElementsByClassName("task")[0]);
+ this.makeTopPriority(task);
}
},
return valid_cursor;
},
+ makeTopPriority: function (task: Element | null = null) {
+ if (!task) task = document.activeElement;
+ if (!task) return;
+ this.setPriority(task, null, document.getElementsByClassName("task")[0]);
+ },
+
moveCursor: function (offset: number): boolean {
const active = document.activeElement;
if (!active) return false;
if (event.key == "k") return browserUI.moveCursor(-1);
if (event.key == "J") return browserUI.moveTask(1);
if (event.key == "K") return browserUI.moveTask(-1);
+ if (event.key == "T") return browserUI.makeTopPriority();
if (event.key == "n") return browserUI.focusTaskNameInput(event);
if (event.key == "c") return browserUI.setState("cancelled");
if (event.key == "d") return browserUI.setState("done");