I have three buttons that will give value between 0 and 2 if not pressed and between 999 and 1000 if pressed.
I can read it with java and all, but I want to simulate keyboard keys if one of those buttons are pressed.
Is there something like isKeyboardKey(LEFT); that represents a keyboard key in Java?
Example:
String key_enter;
String key_left;
String key_right;
if ( sensorValue1 > 100 )
{
key_enter = ENTER; // it will simulate ENTER ( work like regular enter button), so if Word or Notepad is open and the program runs, it will go to new line like a normal ENTER hit.
} else if (sensorValue2 > 100 )
{
key_left = LEFT; // will work like regular left keyboard button
} else if ( sensorValue 3 > 100 )
{
key_right = RIGHT; // will work like regular right keyboard button
} else { System.out.print("No sensor value"); }
Using java.awt.Robot