title: Escape sequence for arrow keys
body: <p>I am trying to recognize the arrow keys from <code>stdin</code> and I have found many resources online suggesting to look for this escape sequence: <code>ESC-[-D</code></p>
  
  <p>However, on my terminal the arrow keys are actually printing the following: <code>ESC-O-D</code></p>
  
  <p>Here is what I get if I run <code>cat</code> and press the left arrow:</p>
  
  <pre><code>$ cat
  ^[OD
  </code></pre>
  
  <p>Could you please help me understand why this is happening? Are both escape sequences considered valid?</p>
  
  <p><strong>Additional information:</strong></p>
  
  <ul>
  <li>The <code>$TERM</code> environment variable is set to <code>screen</code>.</li>
  <li>I am running zsh inside tmux. </li>
  <li>I use Putty to SSH to the server.</li>
  </ul>
  
  <p>Thanks!!</p>