fixed arrow key events for photo gallery: