fixed keyboard input for horizontal
refactored transitions