Adding multiple selections with Alt-Click instead of Ctrl-Click

I am trying to make CodeMirror 6 work more like VSCode (Monaco). I would like to know how to make clicking add a selection range ONLY if the Alt key is pressed, not the Ctrl / Cmd key. Is there any way to make this work? I have been looking through the reference manual, and I couldn’t find anything to help.

Adding this as an extension should do it:

EditorView.clickAddSelectionRange.of(e => e.altKey)

Adding the extension works, however, when using it, you can’t add selection ranges when clicking to the right side of the text.

Below, you can reproduce the error:

basicSetup sets up rectangular selections to use alt. You probably need to remove those from your configuration to use alt for adding selection ranges.

I tried removing the rectangularSelection extension, and it worked. Thank you!