Added support for controlling cursor using arrow keys