Skip to content

fix: accept numpad digits and honor NumLock - #82

Open
iamfitsum wants to merge 1 commit into
typecraft-dev:mainfrom
iamfitsum:fix/numpad-numlock
Open

iamfitsum wants to merge 1 commit into
typecraft-dev:mainfrom
iamfitsum:fix/numpad-numlock

Conversation

@iamfitsum

@iamfitsum iamfitsum commented Nov 6, 2026 •

Copy link
Copy Markdown

Related to #21, #60, and #78.

Those three ignore Qt.KeypadModifier inside isTyping, so a numpad key that already has digit text is accepted. This still leaves the rest of the bug:

  • With NumLock off, Qt reports numpad 8/2/9/3 as Up/Down/PageUp/PageDown. Up at the top of the list calls recallHistory through a synchronous callSync, so the launcher stalls and the digit never lands.
  • NumLock's Wayland scan code is 77, which is also raw numpad 6. Treating 77 as a digit made NumLock insert 6 and eat the lock.
  • While the launcher has exclusive keyboard focus, NumLock does not toggle the keypad. The launcher reads the current lock from hyprctl devices -j when it opens and flips its own flag on the NumLock key. Locked pad types digits. Unlocked pad moves the list.

Test plan

  • node --test tests/*.test.js (149 passed, 3 skipped)
  • Alt+Space, type on the numpad with NumLock on
  • NumLock toggles digits vs arrows and does not insert 6
  • Arrow keys still move the list

Numpad keys were dropped or treated as arrows, and NumLock itself inserted 6.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant