本页还没有译文
本页 8 段还没译成简体中文,下面显示的是英文原文。useHeldKeys
还没翻译译自英文(tanstack.com)本页 8 段都还没译
function useHeldKeys(): Ref<string[]>;Defined in: useHeldKeys.ts:29
Vue composable that returns a reactive ref of currently held keyboard keys.
This composable uses useSelector from @tanstack/vue-store to subscribe
to the global KeyStateTracker and updates whenever keys are pressed
or released.
Returns
Ref<string[]>
Reactive ref containing array of currently held key names
Example
<script setup>
import { useHeldKeys } from '@tanstack/vue-hotkeys'
const heldKeys = useHeldKeys()
</script>
<template>
<div>
Currently pressed: {{ heldKeys.join(' + ') || 'None' }}
</div>
</template>AI 翻译查看英文原文