Detach keydown event handler on hide