cons: handle control characters! . Reference: /n/atom/patch/applied/wd-cons-ctrl Date: Fri Jun 13 20:41:07 CES 2014 Signed-off-by: root@davidrhoskin.com --- /usr/web/9wd/js/cons.js Fri Jun 13 20:40:39 2014 +++ /usr/web/9wd/js/cons.js Fri Jun 13 20:40:40 2014 @@ -36,7 +36,11 @@ } if(dir == cons.kbd.press){ - if(compose.getmode()){ + if(e.ctrlKey){ + compose.reset(); + this.buf += this.ctrl2str(e); + this.flushcallbacks(); + }else if(compose.getmode()){ compose.push(String.fromCharCode(e.which)); }else{ this.buf += String.fromCharCode(e.which); @@ -89,6 +93,10 @@ } return "[control character]"; + } + + this.ctrl2str = function(e){ + return String.fromCharCode(e.which & 0x1F); } this.take = function(s){