Shortcut key alt-click does not take effect

I want to change the default ctrl-click to alt-click the code is as follows. When i execute alt-click the run method is not executed。

  {
    key: 'Alt-click', 
    run: (view: EditorView) => {
      // return EditorView.clickAddsSelectionRange;
      return true;
    },
    preventDefault: true,
  },

how should i register the click event, thanks

Keymaps don’t influence mouse click behavior. You have to add something like this to your extensions:

EditorView.clickAddsSelectionRange.of(event => event.altKey)

Thanks for the reply, I will try