Skip to content

fix(ui): accept numpad keys in launcher inputs - #88

Open
nertwork wants to merge 1 commit into
typecraft-dev:mainfrom
nertwork:fix/87-numpad-input
Open

nertwork wants to merge 1 commit into
typecraft-dev:mainfrom
nertwork:fix/87-numpad-input

Conversation

@nertwork

@nertwork nertwork commented Nov 9, 2026 •

Copy link
Copy Markdown

Summary

  • Masks out Qt.KeypadModifier (0x20000000) in LauncherWindow.isTyping(event) (ui/LauncherWindow.qml) before comparing modifiers against Qt.NoModifier / Qt.ShiftModifier.
  • Enables numeric keypad digits (0–9), operators (+, -, *, /, =), and decimal separators (. / ,) across:
    • Main launcher search, inline calculator queries, and alias editor (handleKey)
    • Focused command argument pills (handleArgumentKey)
    • Popup filter fields in Action Panel, root filter dropdown, and toast actions (handlePopupKey)
  • Preserves Qt.Key_Enter activation and Ctrl / Alt / Meta keypad shortcuts (Ctrl+1..9, Ctrl++, Ctrl+-, Ctrl+0).
  • Adds unit tests in tests/launcher-numpad.test.js executing the QML handlers directly in Node vm context.

Fixes #87

Test Plan

  • node --test tests/*.test.js (144 passed, 0 failed)
  • git diff --check

@nertwork
nertwork force-pushed the fix/87-numpad-input branch 3 times, most recently from 744e960 to b9825d3 Compare November 15, 2026 00:36
…, and Wayland scan codes

Resolve printable numpad characters in LauncherWindow.typedText(event) when Qt sets Qt.KeypadModifier, when Qt/Wayland reports numpad keys with navigation keysyms (Insert/End/Down/PageDown/Left/Clear/Right/Home/Up/PageUp/Delete) and empty event.text, or via XKB keypad nativeScanCode (evdev + 8), while guarding list direction() and PageUp/PageDown from hijacking numpad 8/2/9/3 and preserving Enter and Ctrl/Alt/Meta shortcuts.

Fixes typecraft-dev#87
@nertwork

Copy link
Copy Markdown
Author

Hey @cpow — first off, huge thanks for building oma-cast! It is genuinely an awesome launcher and a massive upgrade to my daily Omarchy / Hyprland workflow (the Quickshell UI, built-in calculator/currency conversion, and script commands are super clean and fast).

Just rebased this PR cleanly onto the latest main (3522b07) so there are zero conflicts with the recent merges. Whenever you get a chance to take a look, it is ready for review — happy to adjust anything if you have preferences on the implementation!

@nertwork
nertwork force-pushed the fix/87-numpad-input branch from b9825d3 to 2342b7d Compare November 17, 2026 22:18
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.

Numpad keys (digits, operators, decimal) are ignored when typing in launcher inputs

1 participant