title: Scanning for up and down arrow in Go?
body: <p>I'm trying to scan for the up and down arrow key codes in Go, but it doesn't seem to be working. So far I've tried this:</p>
  
  <pre><code>in = bufio.NewReader(os.Stdin)
  b, err := in.ReadByte()
  fmt.Println("Key code:", b, err)
  </code></pre>
  
  <p>But when I press the up or down key, it never stops reading (it never run the <code>Println</code> statement) and just displays "^[[A" and "^[[B" directly in the terminal. Any idea?</p>