-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Describe the bug
I don't know for sure whether it's a bug or just an alternative behavior that should be considered a feature...
With a code like:
import { useMagicKeys } from '@vueuse/core'
const keys = useMagicKeys()
const commandX = keys['Meta+X']
watch(commandX, pressed => {
console.info({pressed})
})
and:
- press and hold Command
- press X
- release X
- press X
I would expect the watch to trigger after each press of X rather than only the first time it's pressed.
Reproduction
System Info
System:
OS: macOS 13.3.1
CPU: (10) arm64 Apple M2 Pro
Memory: 1.09 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.19.0/bin/yarn
npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
Browsers:
Chrome: 112.0.5615.137
Firefox: 112.0.1
Safari: 16.4
npmPackages:
@vueuse/core: ^10.1.0 => 10.1.0
@vueuse/nuxt: ^10.1.0 => 10.1.0
Used Package Manager
yarn
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
NicolasReibnitz and olinoles
Metadata
Metadata
Assignees
Labels
No labels