Skip to content

Feature: Improve sequence and combo hotkey support#1288

Open
Wxh16144 wants to merge 8 commits intoJohannesKlauss:mainfrom
Wxh16144-forks:wuxh/try-fix-array-sequentially
Open

Feature: Improve sequence and combo hotkey support#1288
Wxh16144 wants to merge 8 commits intoJohannesKlauss:mainfrom
Wxh16144-forks:wuxh/try-fix-array-sequentially

Conversation

@Wxh16144
Copy link

  • Fixed the issue where sequence hotkeys and combination hotkeys could not be used together.
  • Fixed a bug where array-type sequence hotkeys (e.g. ["h>i", "o>k"]) would not work as expected.
  • Refactored internal logic to reduce code redundancy and improve readability.
  • Improved sequence matching logic to support overlapping and substring sequences.
  • Enhanced test coverage for mixed and array sequence hotkey scenarios.

@vercel
Copy link

vercel bot commented Sep 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
react-hotkeys-hook Skipped Skipped Sep 12, 2025 6:51am

@Wxh16144 Wxh16144 force-pushed the wuxh/try-fix-array-sequentially branch from ddad9a6 to a4a1f9a Compare September 12, 2025 06:31
@Wxh16144 Wxh16144 force-pushed the wuxh/try-fix-array-sequentially branch from 461591d to f746d7d Compare September 12, 2025 06:45
@pksunkara
Copy link

@JohannesKlauss Please let me know if you need any help with reviewing and testing this.

Copy link

@pksunkara pksunkara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I have manually tested these changes too and everything is working.

Would love to get this PR merged since it fixes important bugs with sequential hotkeys.

@pksunkara
Copy link

@Wxh16144 Can you please rebase this?

: mapCode(e.code)

recordedKeys = []
if (!isHotkeyModifier(currentKey.toLowerCase())) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to keep the TODO comment about making modifiers work with sequences.

// TODO: Make modifiers work with sequences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants