code: function moveSelectionBy(
      opts: Options,
      change: Change,
      x: number, //  Move horizontally by x
      y: number // Move vertically by y
  ): Change {
      const { value } = change;
      const { startKey } = value;
      const pos = TablePosition.create(opts, value.document, startKey);
      if (!pos.isInCell()) {
          throw new Error('moveSelectionBy can only be applied in a cell');
      }
  
      const rowIndex = pos.getRowIndex();
      const colIndex = pos.getColumnIndex();
      const width = pos.getWidth();
      const height = pos.getHeight();
  
      const [absX, absY] = normPos(x + colIndex, y + rowIndex, width, height);
      const isGoingUp = y < 0;
  
      if (absX === -1) {
          // Out of table
          return change;
      }
  
      const { table } = pos;
      const row = table.nodes.get(absY);
      const cell = row.nodes.get(absX);
  
      if (isGoingUp) {
          change.collapseToEndOf(cell);
      } else {
          change.collapseToStartOf(cell);
      }
  
      return change;
  }
docs: Move selection by a {x,y} relative movement