On devices with a physical keyboard (e.g. Kindle), the on-screen keyboard
can already be toggled while a text field is focused via Shift/ScreenKB +
Home. This adds a lone tap of the physical Sym key as an additional, more
natural trigger.
Sym is otherwise a held modifier for the symbol layer, and Input:handleKeyBoardEv
swallows a bare modifier press/release before it becomes a key event. Detect a
Sym press+release with no other key in between and surface it as a dedicated
"SymPress" key event, which InputText handles the same way as the existing
Shift/ScreenKB + Home toggle. The symbol layer (Sym+<key>) is unaffected: any
intervening key press clears the lone-tap state, so only a true solo tap fires.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds in-definition search to DictQuickLookup relaying on MuPDF's word-matching implementation, uses tap handling for navigation by allowing temporary disable/restore of Tap events.
Due to the way this was wired, #14937 trigged BookStatusWidget:onSwitchFocus() when closing, which caused the review input dialog to pop right back up again.
But it doesn't look like you're actually supposed to be able to type in there at all, so I replaced it with a TextBoxWidget.
* refactor handling of faked event HoldRelease for text selection on NT, make sure we close the cycle properly so we don't get any byte drift when dealing with non-ascii characters.
* Removed the hold-duration logic for switching between dictionary and wiki lookups, simplifying the process and removing timing-based domain switching, this was a terrible idea on my part (in hindsight, the implementation I mean).
* Added a new `TextSelectorModifierPress` key event and corresponding handler (`onTextSelectorModifierPress`) to explicitly switch domains (Dict <-> Wiki) during text selection, and for following links inside dictionary entries, thus making the feature more discoverable and reliable.
* Refactored the lookup logic into a dedicated `_performLookupOnSelection` function, improving code clarity.
* Updated the gesture coordinate calculation in `_createTextSelectionGesture` to use `text_widget` absolute position instead of `definition_widget`, ensuring correct screen coordinates and accounting for container padding.