* Syncs the internal Set to the Store state.
()
| 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. |