solid-primitives icon indicating copy to clipboard operation
solid-primitives copied to clipboard

`createShortcut` only fires once

Open sebastiansandqvist opened this issue 11 months ago • 1 comments

Describe the bug

In @solid-primitives/keyboard on a mac, any Meta+[key] combination results in the [key] getting stuck in the down state. As a result, you can only trigger the callback in createShortcut once. After that, you need to press the non-meta key again on its own to make it unstuck.

Image

Probably related: https://github.com/solidjs-community/solid-primitives/issues/665

It seems like it may be impossible to get keyup events when the Meta key is being held down on mac. (SO post)

Minimal Reproduction Link

https://stackblitz.com/edit/github-qltgbsks?file=src%2FApp.tsx

sebastiansandqvist avatar Feb 13 '25 05:02 sebastiansandqvist

The linked SO post includes a work-around for Mac that could be considered.

shayanhabibi avatar Jun 12 '25 03:06 shayanhabibi