Fixed button callbacks when pressing enter or esc