Question

I'm developing an application which calculates and displays information which then needs to be copy and pasted into a proprietary program. To make this easier for the user, I'd like to enable them to ctl+v, move cursor, ctl+v, etc., and have my program pick up on the pastes and update the Clipboard automatically after every paste.

Is there any straightforward way of doing this? The only things I've found involve accessing DLLs and the like, and this isn't a project I can spend too much time on at the moment.

Était-ce utile?

La solution

It's possible, check this project out: https://code.google.com/p/jnativehook/

That will allow you to listen to key events even when your app doesn't have focus. It won't work if they don't paste with a keyboard shortcut, though.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top