Skip to content

Add Cmd+Enter keyboard shortcut to trigger generation #122

Description

@Dumebii

Expected behaviour

When focus is inside the main input textarea on the dashboard, pressing Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux) should trigger generation — same as clicking the Generate button.

Implementation

Find the textarea component in the dashboard and attach a keydown handler:

if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {
  e.preventDefault();
  handleGenerate();
}

Acceptance criteria

  • Cmd+Enter triggers generation from the textarea
  • Does not interfere with normal Enter (new line) behaviour
  • Works on Mac (metaKey) and Windows/Linux (ctrlKey)
  • Does not double-submit if the button is clicked at the same time
  • Button shows loading state the same way a click does

This is roughly a 10-line change. Good first issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions