feat: add submit screen number hotkeys

This commit is contained in:
Erik Kotsiuba
2026-04-24 20:46:39 +02:00
parent d1a8edd080
commit c10c61f1eb
5 changed files with 40 additions and 3 deletions
+11 -1
View File
@@ -188,10 +188,20 @@ export function confirmCurrentSelection(state: AskState): AskState {
}
export function applyNumberShortcut(state: AskState, digit: number): AskState {
if (digit <= 0 || isSubmitTab(state)) {
if (digit <= 0) {
return state;
}
if (isSubmitTab(state)) {
if (digit > SUBMIT_ACTION_COUNT) {
return state;
}
return confirmCurrentSelection({
...state,
activeSubmitActionIndex: digit - 1,
});
}
const question = getCurrentQuestion(state);
if (!question) {
return state;
+1 -1
View File
@@ -17,7 +17,7 @@ export const UI_TEXT = {
unanswered: "→ unanswered",
footerInput: " Enter submit · Esc close",
footerNote: " Enter save · Esc close",
footerSubmit: " ↑↓ select · Enter confirm · Esc cancel",
footerSubmit: " 1..3 hotkeys · ↑↓ select · Enter confirm · Esc cancel",
footerMulti:
" ⇆ tab · ↑↓ select · Space toggle · Enter continue · N/Shift+N note · Esc dismiss",
footerDefault: