idlate: implement event handling properly