TanStack Hotkeys version
v0.9.1
Framework/Library version
next v16.1.6
Describe the bug and the steps to reproduce it
When a single-key hotkey (e.g. C) and a sequence starting with a different key but ending with that same key (e.g. G → C) are both registered, pressing the sequence fires both the sequence callback and the single-key hotkey callback.
To Reproduce
// Register a single-key hotkey
useHotkey("C", () => {
console.log("C hotkey fired");
});
// Register a sequence that ends with the same key
useHotkeySequence(["G", "C"], () => {
console.log("G → C sequence fired");
});
// now press G, then press C
// notice that both log fired
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
.
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
TanStack Hotkeys version
v0.9.1
Framework/Library version
next v16.1.6
Describe the bug and the steps to reproduce it
When a single-key hotkey (e.g.
C) and a sequence starting with a different key but ending with that same key (e.g.G→C) are both registered, pressing the sequence fires both the sequence callback and the single-key hotkey callback.To Reproduce
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
.
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct