Paste text system wide
-
Hello,
A sender (tablet, raspberry pi, etc.) sends a text string via tcp sockets to the host application which runs mainly in the tray in the background.
When the host application receives such a text string it shall be pasted the text string at the current (system wide) cursor position.
My first idea was to utilize Clipboard for this task but the "Notes for Universal Windows Platform Users" that only active applications with window focus can access the clipboard will prevent the usage of the Clipboard.
Next idea was to utilize the windows SendInput method to send char by char via keyboard input. But with different keyboard layouts and unicode support this is not a stable and universal solution.
My question is: Do you guys can give me a hint where to search next to solve this problem?
Best regards
hackspider -
@hackspider said in Paste text system wide:
the current (system wide) cursor position
What's that?
only active applications with window focus can access the clipboard
Isn't that your definition of "the current (system wide) cursor position" ?
-
Hello,
"the current (system wide) cursor position" is for example in word or in another a text chat or wherever the user currently sets focus pasteable text field.
"only active applications with window focus can access the clipboard" no this is the restriction from QClipboard to access the windows clipboard. My host program runs in the background in the tray and therefore does not have the window focus and cannot access the windows clipboard properly.
Best regards
hackspider