I am trying to make a program that if you would press a button, it would send a message to the computer as if a button on the keyboard was pressed, kinda like the on screen keyboard the pc has, or something like that. How can i tell the program to send a “message” as such? do i need to use scanner?
Thanks
You can use Java Robot class for this purpose.
http://docs.oracle.com/javase/1.5.0/docs/api/java/awt/Robot.html
for example :