IO handling added

- custom/io.js added
- event based handling for keys and clicks
- poll method (if that's what it is called) of handling keys is the same