toggle

fun toggle(item: T)(source)

Toggles whether item is selected and resets the anchor to item (or to null if the item was deselected to empty). Standard ⌘ / Ctrl-click semantics.