Moving key event handler out from being fixed