Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`useHotkey` callback fire during active `useHotkeySequence` matching

Open
#116 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
frontend

Research direction

Start by reproducing the behavior with the useHotkey("C") and useHotkeySequence(["G", "C"]) registrations described in the issue. Trace how the two hooks handle the second keypress during an active sequence, then verify that pressing G followed by C fires only the sequence callback while standalone C still fires its hotkey callback.

Written by the indexing model from the issue text.

Description

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
  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Dominant language
TypeScript
Stars
729
Forks
47
Avg merge
8d 8h
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TanStack/hotkeys

All issues in TanStack/hotkeys

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.