Once you have your character code implementing it into your interactive application is simple. For example, if you wanted JavaScript to react to a visitor pressing the space button on your website you would use the character code 32 in conjunction with JavaScript to have something happen. You can access the key’s code that was pressed through.
event.keyCodeAs an example, if you wanted your entire document to write space when that button was pushed the code would be as follows:
<script type="text/javascript"> function checkKeyCode(keyCode) { if(keyCode == 32) { document.write('space'); } } </script> <body onkeydown="checkKeyCode(event.keyCode);">