title: Fast Keyevent Simulation (Android Shell)
body: <p>Using <code>adb shell input text &lt;String&gt;</code> or <code>adb shell input keyevent &lt;KEYCODE_NAME&gt;</code> works perfectly fine in sending text to the android device, but my issue is speed.  </p>
  
  <p>Using something like <code>input keyevent KEYCODE_A KEYCODE_A KEYCODE_SPACE KEYCODE_A KEYCODE_ENTER;</code> will type the text quickly, but separating it into 2 commands will result in a (1 sec) delay between the 2 commands (Much Slower).</p>
  
  <p>Sample Shell Code:</p>
  
  <p>Method 1 (Much faster):</p>
  
  <pre><code>input keyevent KEYCODE_A KEYCODE_A KEYCODE_ENTER KEYCODE_A KEYCODE_A KEYCODE_ENTER;
  </code></pre>
  
  <p>Method 2:</p>
  
  <pre><code>input keyevent KEYCODE_A KEYCODE_A KEYCODE_ENTER;
  input keyevent KEYCODE_A KEYCODE_A KEYCODE_ENTER;
  </code></pre>
  
  <p>I would like to type a large text as fast as possible, but having a shell script with <code>input keyevent</code> followed by a large combination of KEYCODE_A for instance, will not be executed. (Large Shell Commands are aborted)</p>
  
  <p>What would be the best way to send large text without having long delays?<br>
  Would <code>sendevent</code> be faster in sending large text?</p>
  
  <p><strong>Note:</strong>  </p>
  
  <ul>
  <li>The weakness of <code>input text &lt;String&gt;</code> is that it also has a limit to it's size and it can't perform special keyevents inside of it (Like the Back Button or Enter/New Line ).</li>
  </ul>
  
  <p>Thanks in Advance.</p>