Simplify key-press-event signal handler
Simplify key-press-event signal handler even more