solidjs-community / solidjs-community/solid-primitives
[keyboard] Pressing Command-[key] breaks key sequences & shortcuts
Nobody has claimed this yet.
- 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.
- Press Command + A.
- Observe that the A stays in "Pressed Keys".
- Press other keys and see they are added to the list with A. Notice the Control + E + R example does not work anymore.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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