protected void handle_keyboard (int key, int state, int x, int y) {
    switch (key) {
    case 's':
    case 'S':      
      if (support_bind) gl.bind_texture (GL.TEXTURE_2D, texture);
      gl.tex_subimage_2d (GL.TEXTURE_2D, 0, 12, 44, 
        Checkerboard.SUB_SIZE, Checkerboard.SUB_SIZE,
        GL.RGBA, GL.UNSIGNED_BYTE, Checkerboard.SUB_PIXELS);
      break;

    case 'r':
    case 'R':
      if (support_bind) gl.bind_texture (GL.TEXTURE_2D, texture);
      tex_image_2d ();
      break;

    default: return;
    }

    mark_window_dirty ();
  }