Skip to content

feat: add / keyboard shortcut to focus the prompt input - #8

Open
monab wants to merge 9 commits into
shadcn-ui:mainfrom
monab:focus-shortcut
Open

feat: add / keyboard shortcut to focus the prompt input#8
monab wants to merge 9 commits into
shadcn-ui:mainfrom
monab:focus-shortcut

Conversation

@monab

@monab monab commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • Add a global / keyboard shortcut that focuses the chat prompt textarea, matching the convention used by GitHub, Linear, and Slack.
  • Ignore the shortcut while already typing in an input, textarea, or contenteditable element, and skip modified presses (Cmd+/, Ctrl+/, etc.) so normal typing is unaffected.
  • Update the placeholder to hint at the shortcut: "Send a message… (press / to focus)".

Test plan

  • pnpm typecheck
  • pnpm lint
  • pnpm build
  • Manually verified in the browser: pressing / while unfocused moves focus to the textarea without inserting the character; pressing / while already focused in the textarea inserts it normally.

@software-dromos

Copy link
Copy Markdown

LGTM

@Jettajacobsen Jettajacobsen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

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.

4 participants