@tanstack/octane-hotkeys 0.11.3 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/useKeyHold.js
CHANGED
|
@@ -3,7 +3,8 @@ import { getKeyStateTracker } from "@tanstack/hotkeys";
|
|
|
3
3
|
|
|
4
4
|
// src/useKeyHold.ts
|
|
5
5
|
function useKeyHold(key, slot) {
|
|
6
|
-
|
|
6
|
+
const tracker = getKeyStateTracker();
|
|
7
|
+
return select(tracker.store, () => tracker.isKeyHeld(key), subSlot(slot, "key-hold"));
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export { useKeyHold };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/octane-hotkeys",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Octane adapter for TanStack Hotkeys",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,9 +35,10 @@
|
|
|
35
35
|
"skills"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@tanstack/hotkeys": "0.
|
|
38
|
+
"@tanstack/hotkeys": "0.27.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
+
"@tanstack/hotkeys-test-utils": "0.0.0",
|
|
41
42
|
"@tsrx/oxc": "0.23.0",
|
|
42
43
|
"@tsrx/typescript-plugin": "^0.6.3",
|
|
43
44
|
"octane": "0.16.7",
|
|
@@ -63,7 +63,7 @@ export function Panel({ onSave }: { onSave: () => void }) @{
|
|
|
63
63
|
| `useHotkeyRegistrations()` | List every registered hotkey with its options, `meta`, and `status` (whether it's enabled and in an active scope), for a cheat sheet of what's mounted. |
|
|
64
64
|
| `useHotkeyScopesState()` | Get the active scopes and the exclusive scope that owns the keyboard. |
|
|
65
65
|
| `useHotkeyHint(hotkey, options?)` | Get whether held modifiers should reveal a shortcut's hint, such as labels that appear while Mod is held. False unless a registration of the hotkey can fire: enabled, in an active scope, and with focus inside its element target. |
|
|
66
|
-
| `useKeyHold(key)` | Get whether one key is held, such as Shift for a range-select mode.
|
|
66
|
+
| `useKeyHold(key)` | Get whether one key is held, such as Shift for a range-select mode. Letters match in any case; other names, such as `Shift`, are case-sensitive. |
|
|
67
67
|
| `useHeldKeys()` | Get every key that's held right now. |
|
|
68
68
|
| `useHeldKeyCodes()` | Map each held key to its physical `event.code`. |
|
|
69
69
|
|