[DictQuickLookup] NT: add key_event for following links and switching (dict-wiki) domains#14909
Merged
Merged
Conversation
…xt selection coordinates and remove all method of switching domains from a timer to key_event
Frenzie
approved these changes
Feb 2, 2026
Frenzie
left a comment
Member
There was a problem hiding this comment.
This is all purely for the keyboard, right?
Member
Author
|
yes, it's for K4 and hasKeyboard. |
Member
Author
|
I am master of my own domain. @poire-z any comments? |
Contributor
|
Looks like it all only touches NT exclusive codepaths that I'm not familiar with. |
0xstillb
pushed a commit
to 0xstillb/koreader-thai
that referenced
this pull request
May 9, 2026
… (dict-wiki) domains (koreader#14909) * 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.
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.
what's new
TextSelectorModifierPresskey 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._performLookupOnSelectionfunction, improving code clarity._createTextSelectionGestureto usetext_widgetabsolute position instead ofdefinition_widget, ensuring correct screen coordinates and accounting for container padding.related issues
This change is