MCPcopy Create free account
hub / github.com/TanStack/hotkeys / #syncState

Method #syncState

packages/hotkeys/src/key-state-tracker.ts:161–166  ·  view source on GitHub ↗

* Syncs the internal Set to the Store state.

()

Source from the content-addressed store, hash-verified

159 * Syncs the internal Set to the Store state.
160 */
161 #syncState(): void {
162 this.store.setState(() => ({
163 heldKeys: Array.from(this.#heldKeysSet),
164 heldCodes: Object.fromEntries(this.#heldCodesMap),
165 }))
166 }
167
168 /**
169 * Removes the keyboard event listeners.

Callers 1

#setupListenersMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected