Handle arrow keys