So I have been trying to use the java.awt.robot class and jnativehook to create a copy and paste program that works where you are not supposed to copy&paste. Basically it just waits for you to type crtl+v, takes the clipboard and is supposed to print it out using robot. The problem here is that in order to type all different characters you would have to hardcode how to type them. Since I know that probably wasnt explained too well heres an example: to print "Hi :)" you would have to write this code:
r.keyPress(KeyEvent.VK_SHIFT);
r.keyPress(KeyEvent.VK_H);
r.keyRelease(KeyEvent.VK_H);
r.keyRelease(KeyEvent.VK_SHIFT);
r.keyPress(KeyEvent.VK_I);
r.keyRelease(KeyEvent.VK_I);
r.keyPress(KeyEvent.VK_SPACE);
r.keyRelease(KeyEvent.VK_SPACE);
r.keyPress(KeyEvent.VK_SHIFT);
r.keyPress(KeyEvent.VK_PERIOD);
r.keyRelease(KeyEvent.VK_PERIOD);
r.keyRelease(KeyEvent.VK_SHIFT);
r.keyPress(KeyEvent.VK_SHIFT);
r.keyPress(KeyEvent.VK_9);
r.keyRelease(KeyEvent.VK_9);
r.keyRelease(KeyEvent.VK_SHIFT);
which is painful and hard to automatise.
So I'm basically asking for somethingwhere the logic of what keys to type in order to get a given output is already implemented.