solidjs-community / solidjs-community/solid-primitives

[keyboard] Pressing Command-[key] breaks key sequences & shortcuts

Open
#553 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
TypeScript
Stars
1.6k
Forks
162
Avg merge
19h 40m
Merged PRs (30d)
8

Description

Describe the bug

When using useKeyDownSequence and createShortcut if you at any time use a shortcut such as Command-A, they will stop working as expected. This issue can be observed on the example provided in the keyboard package's readme.

  1. Press Command + A.
  2. Observe that the A stays in "Pressed Keys".
  3. Press other keys and see they are added to the list with A. Notice the Control + E + R example does not work anymore.
  4. Blur the window and notice the A is removed. Pressing A will also remove it.

I've observed this behavior on MacOS Chrome and Safari, have not tried on Windows.

Minimal Reproduction Link

https://codesandbox.io/s/solid-primitives-keyboard-demo-s2l84k?file=/index.tsx

Contributor guide

Open the contributing guide

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 with the keyboard package README example and trace the useKeyDownSequence and createShortcut entry points using the linked reproduction. Reproduce the issue in macOS Chrome or Safari, then verify that Command-A no longer remains in Pressed Keys and that subsequent key sequences and shortcuts continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.