Turn arcade monitor 90 degrees with keyboard or button press

See the StateChangeDetection example. You also need a flag telling the current rotation (90° yes/no), so that you know the servo position to go when a button change is detected.