Handle left click + ctrl key in usePress
To trigger context menus you can either
- right click
- hold ctrl and click
The usePress hook wasn't handling the second case.
Interesting. Given the specs and OS behaviors does it make sense?
I'll have to see where we got "should toggle items in selection highlight with ctrl-click on Mac" https://github.com/adobe/react-spectrum/blob/main/packages/%40react-spectrum/list/test/ListView.test.js#L1016
Because I tried out Ctrl + Click on https://react-spectrum.adobe.com/react-spectrum/ListView.html#highlight-selection and the context menu came up and it didn't toggle the selection if I had everything already selected. But it did with the CMD key.
So I'm thinking a wire got crossed somewhere.
Hey, we were discussing this a bit more today and none of us know where the context menu isn't working for that second case. Could you provide step by step instructions including a link to the component which you are trying this on? For instance, we tried opening https://react-spectrum.adobe.com/react-spectrum/Button.html#example and Ctrl+Clicking on this button and we see a context menu.
I've fixed up our tests to be a little more accurate Fix ListView tests for highlight + modifier keys
Closing as stale.