flekschas / regl-scatterplot

Scalable WebGL-based scatter plot library build with Regl
https://flekschas.github.io/regl-scatterplot/
MIT License
184 stars 21 forks source link

Adding ctrl and cmd in the keymap with same action (merge) #180

Open rv-ibena opened 4 weeks ago

rv-ibena commented 4 weeks ago

Hi @flekschas!

I noticed that Ctrl is not added in the default keymap. I added it like so keyMap: { alt: 'rotate', ctrl: 'merge', shift: 'lasso', }, and everything works fine. However if I add cmd as well keyMap: { alt: 'rotate', cmd: 'merge', ctrl: 'merge', shift: 'lasso', }, then CTRL stops working (I don't know about cmd, I'm on a linux). Can we have more than one key with the same action or I am doing something wrong?

Thank you!

flekschas commented 6 days ago

Apologies for my late reply. I somehow missed the issue. At the moment, the key<>action mapping expects a 1:1 relationship.

The cmd key refers to macOS's command key, which under the hood maps to what's called the meta key. I don't know for sure what the meta key maps to on linux.