Implemented arrow key traversal of stack.