key pressing

Use the Serial Monitor in the Arduino IDE to send commands to the Arduino, and the Arduino serial port to receive them. Then you can write a sketch to do whatever you want on the Arduino in response to the commands received.