protected void handle_keyboard (int key, int state, int x, int y) {
    switch (key) {
    case 's':                   // fall through
    case 'S': smoothing = !smoothing; break;
    case Misc.PAGE_UP: point_size++; break;
    case Misc.PAGE_DOWN: point_size--; break;
    case Misc.LEFT: position [0] -= DELTA; break;
    case Misc.RIGHT: position [0] += DELTA; break;
    case Misc.UP: position [1] += DELTA; break;
    case Misc.DOWN: position [1] -= DELTA; break;      
    default: return;
    }

    mark_window_dirty ();
  }