Skip to content

Add Alt+1/Alt+2 quick-answer shortcuts to Classic True/False cards#170

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-hotkey-shortcut-support
Draft

Add Alt+1/Alt+2 quick-answer shortcuts to Classic True/False cards#170
Copilot wants to merge 2 commits intomainfrom
copilot/add-hotkey-shortcut-support

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

The True/False notetype lacked the same keyboard-driven answering flow available in other interactive templates. This PR adds direct shortcut answering so reviewers can answer TF items without mouse interaction.

  • Shortcut behavior in TF entry

    • Added keyboard handling in templates/classic/src/entries/tf.tsx:
      • Alt+1 / Option+1True
      • Alt+2 / Option+2False
    • Shortcuts target the first unanswered TF item only, enabling fast sequential answering.
    • Shortcut handling is ignored on the back side.
  • TF shortcut state helper

    • Added templates/classic/src/features/tf/shortcut.ts with getFirstUnansweredIndex(itemCount) to resolve which item should receive a hotkey action.
  • Focused test coverage

    • Added templates/classic/tests/tf-shortcuts.test.ts for first-unanswered detection logic:
      • returns the next unanswered index when partial answers exist
      • returns -1 when all items are answered
  • Docs update

    • Updated TF docs to document the new shortcuts:
      • apps/docs/src/en/templates/classic/tf.md
      • templates/classic/docs/tf.md
useKeyPress(['alt.1', 'alt.2'], (event, key) => {
  if (back || getFirstUnansweredIndex(itemCount) !== index) return;
  event.preventDefault();
  onStatusChange(key === 'alt.1'); // alt.1 => true, alt.2 => false
});

True/False shortcuts documentation update

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature request] Hotkey/ Shortcut quick answering.</issue_title>
<issue_description>It would be amazing to have added hotkey/shortcut support on all of your notetypes.
Like in other notetypes that offer multiple choice.
There you can press alt 1 for option one, alt two for two etc. For the true false card it would be amazing as it would make the workflow so much faster.
Thank you so much for your work.</issue_description>

<agent_instructions>use node 24</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add hotkey support for quick answering in notetypes Add Alt+1/Alt+2 quick-answer shortcuts to Classic True/False cards Feb 16, 2026
Copilot AI requested a review from ikkz February 16, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] Hotkey/ Shortcut quick answering.

2 participants