• console.inkey()

    From MCMLXXIX@VERT/MDJ to Deuce on Tue May 20 15:32:13 2008
    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)ã
  • From Deuce@VERT/SYNCNIX to MCMLXXIX on Tue May 20 14:26:26 2008
    Re: console.inkey()ã By: MCMLXXIX to Deuce on Tue May 20 2008 03:32 pmãã > 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()?ããYou appear to have CTRL-[ or ESC set in console.ctrlkey_passthru. I'm not sureãhow you're setting the value of this variable, but adding the line:ãconsole.ctrlkey_passthru="-[";ãwill clear the offending bit.ãã--- ãSynchronet - Jump on the Web 0.2 bandwagon!ãã---ã þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)ã