clean shutdown on keyboard command
make event id configurable