fix focus direction on key handler