Added keyboard support for pause/restart functionality