Update console.go to work across browsers

The KeyboardEvent.keyIdentifier property doesn't work in some browsers (such as Firefox). This commit implements a more cross-browser handling of key presses. 

Sometime in the future [KeyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.key) should work and be more clear, but isn't supported well yet.