Subj : console.inkey()
To   : Deuce
From : MCMLXXIX
Date : Tue May 20 2008 03:32 pm

Hey man.. seeing as how you love that my script processes one key at a time,
I'm using inkey() even more.... except I've run into a problem!

does that surprise you?! I didn't think so

I'm trying to use a switch statement to catch arrow keys from console.inkey()

It doesn't seem to be working.. it is passing some fancy ansi thru instead, and
not catch them. do the K_<mode> bits work with console.inkey()?

here's how I wrote it, ... and none of the cases pick up the keys:

var key=console.inkey();
switch(key) {

  case KEY_DOWN:
  case KEY_UP:
  case KEY_LEFT:
  case KEY_RIGHT:
  case '\x1e':
  case '\x0a':
  case '\x06':
  case '\x1d':
     write("die");
     break;

}

there are other cases, and such, but that was the problem area.

---
� Synchronet � The BRoKEN BuBBLE (MDJ.ATH.CX)