protected void handle_keyboard (int key, int state, int x, int y) {
    switch (key) {
    case 'e': elbow_angle = (elbow_angle + 5) % 360; break;
    case 'E': elbow_angle = (elbow_angle - 5) % 360; break;
    case 's': shoulder_angle = (shoulder_angle + 5) % 360; break;
    case 'S': shoulder_angle = (shoulder_angle - 5) % 360; break;
    default: return;
    }

    mark_window_dirty ();
  }