(key: IndividualKey)
| 43 | * ``` |
| 44 | */ |
| 45 | export function useKeyHold(key: IndividualKey): boolean { |
| 46 | const tracker = getKeyStateTracker() |
| 47 | const normalizedKey = key.toLowerCase() |
| 48 | |
| 49 | return useSelector(tracker.store, (state) => |
| 50 | state.heldKeys.some((heldKey) => heldKey.toLowerCase() === normalizedKey), |
| 51 | ) |
| 52 | } |
no test coverage detected
searching dependent graphs…