Step 6: Toggle Capslock

Our keypad consists of 40 individual Keypad Character objects, each with 2 animation directions. Right is uppercase and left is lowercase. To toggle capslock, we simply switch between these 2 directions.
Animation sequences have 32 directions. Direction 0 is right and direction 16 is left. Any directional value above 31 will be converted with Mod 32. This means direction 32 is the same as direction 0.
So, to toggle between left and right, we simply add 16 to the direction.

9