Keyboard interrupt handling
This works better for the toy example