Added keyboard handler