Added keyboard handler.
Added close key.