title: How to: Simulating keystroke inputs in shell to an app running in an embedded target
body: <p>I am writing an automation script that runs on an embedded linux target. </p>
  
  <p>A part of the script involves running an app on the target and obtaining some data from the stdout. Stdout here is the ssh terminal connection I have to the target. </p>
  
  <p>However, this data is available on the stdout only if certain keys are pressed and the key press has to be done on the keyboard connected to the embedded target and not on the host system from which I have ssh'd into the target. Is there any way to simulate this?</p>
  
  <p>Edit:
  Elaborating on what I need - </p>
  
  <p>I have an OpenGL app that I run on the embedded linux (works like regular linux) target. This displays some graphics on the embedded system's display device. Pressing f on the keyboard connected to the target outputs the fps data onto the ssh terminal from which I control the target. </p>
  
  <p>Since I am automating the process of running this OpenGL app and obtaining the fps scores, I can't expect a keyboard to be connected to the target let alone expect a user to input a keystroke on the embedded target keyboard. How do I go about this? </p>
  
  <p>Edit 2:
  Expect doesn't work since expect can issue strokes only to the ssh terminal. The keystroke I need to send to the app has to come from the keyboard connected to the target (this is the part that needs simulation without actually having a keyboard connected to it).</p>
  
  <p>Thanks.</p>