Source here – https://github.com/devdave/DevDave-s-miscellanious-bucket/tree/master/jsConsole
Just wanted to see what would be involved in making a terminal like UI for the web. Honestly there’s a few REALLY annoying bits, but with a bit of hackery it was pretty straight forward. I’ve found splitting up the keyCode/which between key press and key down events was a lot simpler then making some sort of jury rigged code to character map when trying to compute shifted keys.
Also, I put in a brutally ugly left to right parser that does auto-complete / tab completion for good measure. It’s got a very limited vocabulary but I could easily snap it into an asyncronous Ajax handler to bridge it with a much more powerful server side module.
Like all of my short term projects, no warranty or guarantee that it works is provided or implied.