protected void handle_keyboard (int key, int state, int x, int y) {
    switch (key) {
    case 'r':                   // fall through
    case 'R':
      zoom_factor = 1.0f;
      System.out.println ("zoom-factor reset to 1.0");
      mark_window_dirty ();
      break;

    case 'z':
      zoom_factor += 0.5f;
      if (zoom_factor > 3.0f) zoom_factor = 3.0f;
      System.out.println ("zoom-factor: " + zoom_factor);
      break;

    case 'Z':
      zoom_factor -= 0.5f;
      if (zoom_factor < 0.5f) zoom_factor = 0.5f;
      System.out.println ("zoom-factor: " + zoom_factor);
      break;
    }
  }