function handleSpaceAndEnter(oTable, oEvent) {
		const oCellInfo = TableUtils.getCellInfo(oEvent.target);

		// Select/Deselect all.
		if (oCellInfo.isOfType(CellType.COLUMNROWHEADER)) {
			oTable._getSelectionPlugin().onHeaderSelectorPress();

		// Expand/Collapse group.
		} else if (KeyboardDelegate._allowsToggleExpandedState(oTable, oEvent.target)) {
			getRowByDomRef(oTable, oEvent.target).toggleExpandedState();

		// Select/Deselect row.
		} else if (oCellInfo.isOfType(CellType.ROWHEADER)) {
			selectItems();

		} else if (oCellInfo.isOfType(CellType.DATACELL | CellType.ROWACTION)) {
			// The action mode should only be entered when cellClick is not handled and no selection is performed.
			let bEnterActionMode = !oTable.hasListeners("cellClick");

			// Fire the cell click event.
			if (!oTable._findAndfireCellEvent(oTable.fireCellClick, oEvent)) {

				// Select/Deselect row.
				if (TableUtils.isRowSelectionAllowed(oTable)) {
					selectItems();
					bEnterActionMode = false;
				}
			}

			if (bEnterActionMode) {
				const $InteractiveElements = TableUtils.getInteractiveElements(oEvent.target);
				if ($InteractiveElements) {
					oTable._getKeyboardExtension().setActionMode(true);
				}
			}
		}

		function selectItems() {
			let _doSelect = null;
			if (oTable._legacyMultiSelection) {
				_doSelect = function(oRow) {
					oTable._legacyMultiSelection(oRow.getIndex(), oEvent);
				};
			}
			TableUtils.toggleRowSelection(oTable, oEvent.target, null, _doSelect);
		}
	}
Handler which is called when the Space or Enter keys are pressed.
Opening the column context menu is not handled here, because pressing the ENTER key triggers sapenter on keydown. The column header should
only be opened on keyup.

@param {sap.ui.table.Table} oTable Instance of the table.
@param {jQuery.Event} oEvent The event object.