Repository navigation
fix(overview): activate the search result with Enter again - #152
Merged
Merged
Conversation
`MaterialApp` installs `DefaultTextEditingShortcuts`, which maps `Enter` to a do-nothing intent handled by the focused `EditableText`. `VeshellShortcutManager` wraps `MaterialApp` (see `main.dart`), so its global `navigation.activate` binding — and the framework's own `Enter` binding — sit above those text-editing shortcuts and never see the key while the search field is focused. Since #139 replaced the search pane's local `CallbackShortcuts` with the global binding, `Enter` after a search has therefore been swallowed: nothing was activated. Bind `Enter`/`NumpadEnter` to `ActivateIntent` in the search pane again, close enough to win over `DefaultTextEditingShortcuts`. `Space` stays unbound so the field keeps typing spaces; a focused client surface is a sibling of the pane and still receives `Enter` (its `SurfaceFocus` shadows it). The regression test mirrors the real tree (`VeshellShortcutManager` above `MaterialApp`); it fails without this binding.
PapyElGringo
force-pushed
the
fix/overview-enter-after-search
branch
from
October 15, 2026 10:32
ee9bfc7 to
e957844
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Regression from #139: after a search, pressing
Enterin the overview search field no longer activated the first result.Root cause.
MaterialAppinstalls Flutter'sDefaultTextEditingShortcutsinside itself; they mapEntertoDoNothingAndStopPropagationTextIntent, and while anEditableTextis focused its action consumes the key (withconsumesKey: false, it stops propagation).VeshellShortcutManagerwrapsMaterialApp(seemain.dart), so the globalnavigation.activatebinding — and the framework's ownEnterbinding — live above those text-editing shortcuts and never get the key while the search field is focused.#139 replaced the search pane's local
CallbackShortcuts(which sat below the text-editing shortcuts and won) with the global binding, soEnterhas been swallowed ever since: nothing was activated.Fix. Bind
Enter/NumpadEntertoActivateIntentin the search pane again, close enough to win overDefaultTextEditingShortcuts. TheActivateIntenthandler is unchanged and still registered only by the search pane and result lists.Spaceis deliberately left unbound, so the search field keeps typing spaces.Enter(itsSurfaceFocusshadows it).Testing
New
test/application_search_enter_test.dartmirrors the real tree (VeshellShortcutManageraboveMaterialApp), types a query, and asserts the first result is launched. It fails without the fix.flutter test— 485 passedflutter analyze— 0 errorsdart format --set-exit-if-changed— cleanDocs updated:
overview.md,navigation.md.Note: this is independent of #151 (which gives a launched window the keyboard); it applies directly on
main.