Skip to content

[DictQuickLookup] NT: add key_event for following links and switching (dict-wiki) domains#14909

Merged
Frenzie merged 1 commit into
koreader:masterfrom
Commodore64user:mod+press
Feb 6, 2026
Merged

[DictQuickLookup] NT: add key_event for following links and switching (dict-wiki) domains#14909
Frenzie merged 1 commit into
koreader:masterfrom
Commodore64user:mod+press

Conversation

@Commodore64user

@Commodore64user Commodore64user commented Feb 2, 2026

Copy link
Copy Markdown
Member

what's new

  • 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.

related issues


This change is Reviewable

…xt selection coordinates and remove all method of switching domains from a timer to key_event

@Frenzie Frenzie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all purely for the keyboard, right?

@Frenzie Frenzie added this to the 2026.02 milestone Feb 2, 2026
@Commodore64user

Copy link
Copy Markdown
Member Author

yes, it's for K4 and hasKeyboard.

@Commodore64user

Copy link
Copy Markdown
Member Author

I am master of my own domain. @poire-z any comments?

@poire-z

poire-z commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Looks like it all only touches NT exclusive codepaths that I'm not familiar with.
So no comment, trusting you.

@Frenzie Frenzie merged commit 3103627 into koreader:master Feb 6, 2026
4 checks passed
@Commodore64user Commodore64user deleted the mod+press branch February 6, 2026 15:16
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.
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.

3 participants