vercel / vercel/hyper

Search backwards with a Shift + Enter keyboard shortcut

Open
#6,732 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
44.7k
Forks
3.6k
Avg merge
21m
Merged PRs (30d)
1

Description

Is your feature request related to a problem? Please describe.
Searching backwards with a keyboard shortcut. Right now you can only search forward by clicking "Enter", but it is common to search backwards with "Shift + Enter".

Describe the solution you'd like
Add a keyboard shortcut to searchBox.tx, for example:

if (event.shiftKey && event.keyCode === enterKey) {
  this.props.prev(event.currentTarget.value);
} else if (event.keyCode === enterKey) {
  this.props.next(event.currentTarget.value);
}

Describe alternatives you've considered
Clicking the "find previous" button in the search bar, but that requires a lot of effort and annoying when I'm using the "Enter" shortcut and want to go backwards.

Additional context
N/A

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the searchBox.tx file named in the issue and inspect how the Enter key and the find-previous control are handled. Add the requested Shift + Enter behavior and verify that Enter still searches forward while Shift + Enter searches backward.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.