// to be pressed once in order for the robot to start moving
manual_mode = False
successful_exit = True
refresh_rate = 20.0
with Input(keynames = "curtsies", sigint_event = True) as input_generator:
while True:
period = 1 / refresh_rate
// if nothing is captured in [period] seconds
// then send() function returns None
key = input_generator.send(period)
// if we"ve captured something from the keyboard
if key is not None:
result = gopigo3.executeKeyboardJob(key)