regl-scatterplot icon indicating copy to clipboard operation
regl-scatterplot copied to clipboard

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

Open rv-ibena opened this issue 1 year ago • 1 comments

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!

rv-ibena avatar Jun 06 '24 15:06 rv-ibena

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.

flekschas avatar Jun 28 '24 13:06 flekschas

Closing this ticket as I believe the question is answered. At the moment you cannot have more than one key map to the same action unfortunately.

flekschas avatar Jan 08 '25 15:01 flekschas