More error handling and closing of device on error.
Added missing potential exception when opening a SerialDevice.
Added support for catching key send events, added KEY_PANIC, bugfixes.
Added support for iterating over event handlers.