title: how to detect the ESC key in C?
body: <p>i wrote a piece of code to detect arrow keys using <code>_getch();</code> and i wish to detect the esc key as well but i dont actually know what are the numbers that i should use so any help is appreciated.</p>
  
  <pre><code>#include &lt;conio.h&gt;
  #include &lt;stdio.h&gt;
  #define KEY_UP 72
  #define KEY_DOWN 80
  #define KEY_LEFT 75
  #define KEY_RIGHT 77
  
  int c = 0;
  _getch();
  switch ((c = _getch())) {
  case KEY_UP:
      printf("Up\n");
      break;
  case KEY_DOWN:
      printf("Down\n");
      break;
  case KEY_LEFT:
      printf("Left\n");
      break;
  case KEY_RIGHT:
      printf("Right\n");
      break;
  default:
      printf("Null\n");
      break;
  </code></pre>
  
  <p>each of the arrow keys is a combination of two characters of ascii code 224 and the defined ones (notice the first <code>_getch();</code>) but i dont know that for the escape key, i tried searching but didnt find them, a full list of those would be so helpful.</p>
  
  <p>Thanks.</p>