First pass at keyboard and mouse events. They work, but probably still have bugs.

why? leave it so its visible after exit?