Skip to content

Fix numpad typing in launcher - #21

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

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

Conversation

@amanmprojects

@amanmprojects amanmprojects commented Oct 21, 2026 •

Copy link
Copy Markdown

Fix numpad typing

Numpad digits and + - / * were discarded because Qt includes KeypadModifier in their events, while the launcher's printable-text check accepted only no modifier or Shift.

Ignore only the keypad flag when checking text input. This fixes root queries, aliases and action-panel filters while preserving Enter and Ctrl/Alt/Meta shortcut handling.

Rebased onto current upstream main (90efedd). Extracts the input fix discovered in #16; no calculator replacement, runtime dependencies, desktop configuration changes or host-compatibility changes.

Verification

  • node --test tests/*.test.js: 95 passed on the rebased branch, including seven launcher-input regressions. I re-ran the same test file against unpatched main: 4 passed, 3 failed, so the regressions do catch the bug.
  • Tests execute the actual isTyping and handleKey functions from QML with Qt constants and stubbed UI actions, so they run in the existing Node CI without requiring a desktop.
  • Shell syntax, plugin-manifest JSON, plugin validation and whitespace checks passed.
  • Earlier live Wayland verification during Add inline calculator to root search (Phase 2) #16's investigation reproduced rejected keypad events before the fix and displayed 11.5 for all-numpad 2+3*4-6/2+0.5 afterward. That live check used Add inline calculator to root search (Phase 2) #16's branch. A fresh upstream-native window check was blocked on this machine by its pre-existing Omarchy host-type incompatibilities; those are outside this patch.

🤖 Generated with Claude Code

Ignore Qt's keypad flag when checking printable text. Add CI regressions for keypad digits, operators, alias and action filtering, and shortcut dispatch without changing the calculator.

Co-Authored-By: Claude Code <noreply@anthropic.com>
cpreston321 added a commit to cpreston321/oma-cast that referenced this pull request Oct 26, 2026
cpreston321 added a commit to cpreston321/oma-cast that referenced this pull request Oct 26, 2026
The test's mock window predated the action-panel key, navigation
bindings and editor views. It now extracts those helpers from
LauncherWindow.qml too, so the numpad paths run the real routing.
cpreston321 added a commit to cpreston321/oma-cast that referenced this pull request Oct 26, 2026
…ueries

The query is now a native TextInput, so typing moves out of handleKey.
Resolution: keep the fork's guard against popping an empty quicklink
form on Backspace, and cap the input at a script prompt's maxLength
(setQuery refuses longer text, which the field would otherwise show).

typecraft-dev#21 and typecraft-dev#26 both added tests/launcher-input.test.js. It is now typecraft-dev#26's,
with the editor helpers its alias test routes through; typecraft-dev#21's numpad
tests move to tests/launcher-keypad.test.js, where printable numpad keys
in the query now pass through to the native input.
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