本页还没有译文
本页 8 段还没译成Deutsch,下面显示的是英文原文。createHeldKeys
还没翻译译自英文(tanstack.com)本页 8 段都还没译
function createHeldKeys(): () => string[];Defined in: createHeldKeys.ts:26
SolidJS primitive that returns a signal of currently held keyboard keys.
This primitive uses useSelector from @tanstack/solid-store to subscribe
to the global KeyStateTracker and updates whenever keys are pressed
or released.
Returns
Signal accessor for array of currently held key names
() => string[]
Example
function KeyDisplay() {
const heldKeys = createHeldKeys()
return (
<div>
Currently pressed: {heldKeys().join(' + ') || 'None'}
</div>
)
}AI 翻译查看英文原文