Example of using the Select interaction. Select features by clicking polygons. Hold the Shift-key to toggle the feature in the selection.
See the select-features.js source to see how this is done.