Skip to content

fix(search): Enables moving cursor position in input - #26

Open
adamcbrewer wants to merge 7 commits into
typecraft-dev:mainfrom
adamcbrewer:feat/25-query-cursor-editing
Open

adamcbrewer wants to merge 7 commits into
typecraft-dev:mainfrom
adamcbrewer:feat/25-query-cursor-editing

Conversation

@adamcbrewer

@adamcbrewer adamcbrewer commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Left and Right don't move the query cursor because the launcher draws plain text and appends every character. Correcting the middle of a calculation means deleting everything after it.

Change

Uses a native Qt text input for root search, submenu searches and aliases. Arrow keys, Home/End, selection and deletion work at the cursor, and long queries scroll as it moves. Typing 12+34, pressing Left twice and inserting 5 gives 12+534.

Clipboard paste and text sent through the input-method insertion helper use the cursor or replace the selection. Popup and argument focus, emoji-grid navigation, Super shortcuts and the cached instant-open path keep their upstream behaviour. The component lives at ui/QueryInput.qml in the current marketplace layout.

Fixes #25. Includes upstream's input-method support from #63.

Testing

  • node --test tests/*.test.js: 199 passed, 3 skipped. The native Qt query-editing suite ran successfully.
  • With OMACAST_QML_RUNNER=/usr/bin/qs, the optional real-QML guard checks also passed. The native search-helper integration test was skipped because its binary isn't built locally.
  • QML lint and launcher parse, repository-root plugin validation, Bash syntax and whitespace checks against upstream passed.
  • Regression coverage verifies Script Commands dropdown clicks preserve option cycling and query focus restoration.

The opt-in loading-feedback probe fails on unchanged upstream too: its fixture extracts only the first line of the now-multiline footer binding and produces invalid QML. This PR leaves that unrelated test unchanged.

The installed desktop plugin wasn't reloaded. Live fcitx5/ibus composition hasn't been checked.

Uses a native text input so queries can be corrected in place while keeping launcher navigation and shortcuts.

Fixes typecraft-dev#25
)

Keeps cursor editing alongside upstream command arguments, popups and clipboard paste (typecraft-dev#27). Pasted text respects the query cursor and selection.

Refs typecraft-dev#25, typecraft-dev#27
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.
@adamcbrewer adamcbrewer changed the title Enables cursor editing in launcher queries fix(search): Enables moving cursor position in input Oct 29, 2026
Keeps input composition reset alongside upstream search cancellation and updates paste tests for panels loaded on demand.

Refs typecraft-dev#25
Moves the query input and its test imports into the root ui directory after the marketplace layout change. Keeps the current development instructions alongside the query-editing test notes.

Refs typecraft-dev#25
…t-dev#25)

Keeps upstream input-method commits, instant-open caching and Super navigation alongside native query editing. Adds regression coverage for cursor-aware commits and the merged show/hide paths.

Refs typecraft-dev#25
…aft-dev#25)

Keeps Script Commands dropdown cycling alongside query focus restoration when merging current upstream.

Refs typecraft-dev#25
…ft-dev#25)

Keeps the query-editing shortcuts in the rewritten keyboard table alongside the new upstream documentation and website.

Refs typecraft-dev#25
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.

Bug: Left and Right arrow keys don't move the query cursor

1 participant