keyboard and mouse events are added.