function moveCursorTo(x, y, shiftKey = false, ctrlKey = false) {
		const pos = renderer.screenToTextCoordinates(x, y);

		hideTooltip();

		if (shiftKey) {
			const anchor =
				editor.selection.getSelectionAnchor() || editor.getCursorPosition();
			editor.selection.setRange({ start: anchor, end: pos });
			selectionMode($end);
			return;
		}

		if (ctrlKey) {
			const range = new Range(pos.row, pos.column, pos.row, pos.column);
			const ranges = editor.selection.getAllRanges();
			const exists = ranges.some((r) => compareRanges(r, range));
			if (exists) {
				editor.selection.clearSelection();
				ranges.splice(ranges.indexOf(exists), 1);
				ranges.forEach((r) => editor.selection.addRange(r));
				return;
			}

			editor.selection.addRange(range);
			return;
		}

		editor.selection.moveToPosition(pos);
	}
Moves cursor to given position
@param {number} x
@param {number} y
@param {boolean} [shiftKey]
@param {boolean} [ctrlKey]