I have a translation application for a niche language.
If the user selects/highlights text (typically in the browser) I want the translation func to get triggered. It manually checks and if the language is detected it translates.
I do have my onMouseUp Listener that triggers. However I don’t know how to get the selected text, how to put it into a variable (without triggering ctrl+c and possibly overwriting the users clipboard)
Iam not sure what I am trying to do is possible.
Is it possible to get the users selected/highlighted text in an other app (browser), without triggering ctrl+c and clipboard?
Used pyperclip package however since it uses clipboard it overrides the users current clipboard text which might be important to the user.