Sorry that I have to describe the functionality in such a roundabout manner, but I’ve no idea how to best implement the wanted functionality*
I have a simple program that puts some data into the clipboard when a global hotkey is pressed. The usual use case for the user is then to directly paste that text into a textfield in Photoshop. I.e. – assuming ctrl-x invokes the global hotkey – they’re constantly doing ctrl-x ctrl-v. Clearly that’s bad design.
So what’s the simplest way to basically simulate the ctrl-v event so that Photoshop will paste the text directly without an additional keypress?
As the winapi tag implies I don’t care about Macs here. Has to work under Win 7, compatibility with XP/Vista would be a definite plus. Rest of the script is written in Python3 with PyQt4, but I can write some c extension if necessary too.
PS: Everyone who has a better idea wrt the title is more than welcome to improve it.
*And I want to avoid the trap of implementing the simple halve of a problem and then asking for something impossible.
Use
SendInput(). I didn’t test this, but it should work: