Finally, we can apply the same principle on the last 2 conditions. This time, we just have to change the y to x. We will set R1 as Left and R2 as Right.
Every time R1 is pressed, x is reduced by 5. Moving the pixel to the left.
Every time R2 is pressed, x is incremented by 5. Moving the pixel to the right.