diff --git a/load/defs.js b/load/defs.js index a660f2a..975556b 100644 --- a/load/defs.js +++ b/load/defs.js @@ -260,11 +260,11 @@ Frame.prototype.parse = function(text) { f = 39; b = 49; - // Forground Color + // Forground Color } else if (csi[num] >= 30 && csi[num] <= 39) { f = csi[num]; - // Background Color + // Background Color } else if (csi[num] >= 40 && csi[num] <= 49) { b = num; } @@ -352,6 +352,7 @@ Frame.prototype.parse = function(text) { this.frame_fields.push({ ftype: fieldtype, flength: fieldlen, + fchar: fieldchar, r: r, c: c, attribute: {i:i,f:f,b:b}, diff --git a/main.js b/main.js index 8222ca9..060f951 100644 --- a/main.js +++ b/main.js @@ -43,7 +43,7 @@ while(bbs.online) { if (action == false) { read = console.inkey(K_NONE,inkey_timeout); } - log(LOG_DEBUG,'READ: ['+read+']'); + log(LOG_DEBUG,'READ: ['+read+'] ('+read.charCodeAt(0)+')'); inkey_timeout = 60000; // Set our key timeout to 60s system.node_list[bbs.node_num-1].action=0xff; // to ensure our node status is updated correctly @@ -230,7 +230,7 @@ while(bbs.online) { // End of field entry. case '#': case '\r': - log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+'] A'); + log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+']'); // Next Field fn++; @@ -250,20 +250,21 @@ while(bbs.online) { break; case '*': - log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+'] B'); + log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+']'); //$current['prevmode'] = MODE_FIELD; action = ACTION_STAR; break; - case KEY_DEL: - log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+'] C'); - /* - if ($this->fo->setFieldCurrentInputDelete()) - $client->send(LEFT.$this->fo::$if_filler.LEFT); + // Delete Key pressed + case CTRL_H: + log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+']'+' cf:'+(cf ? cf.fvalue.length : '{}')+' ct:'+cf.ftype); - */ + if (cf.fvalue.length > 0) { + cf.fvalue = cf.fvalue.substring(0,cf.fvalue.length-1); + console.write(KEY_ESC+'[D'+cf.fchar+KEY_ESC+'[D'); + } break;