Caeden117 / ChroMapper

GitHub repository for ChroMapper, the Unity-based map editor for Beat Saber.
https://cm.topc.at/dl
GNU General Public License v2.0
300 stars 87 forks source link

Selecting a note with SHIFT + click also does the action for a regular click, on M2 Mac #525

Closed asokoloski closed 3 months ago

asokoloski commented 4 months ago

ChroMapper version 0.9.690 on M2 Mac.

Describe the Issue When I try to SHIFT + click on a note to select it, it is selected, but it also is changed depending on what tool I have currently active. So for example, if I have the blue block tool active, and I SHIFT-click on a red block, it turns the red block blue. It also changes the direction, etc.

Before. Note that the blue block tool is active.

before_SHIFT_click

After a SHIFT-click. The block was selected, but changed color.

after_SHIFT_click

Steps to Reproduce I think it's pretty clear. Just wanted to reiterate that I'm on an M2 Mac. I don't expect this is a cross-platform issue since it would be noticed pretty quickly, I think.

Expected Behavior The object is only selected, not modified.

Additional Context I think that this may also be happening not just for select, but for other actions. I had some trouble with copy and paste, as when I tried to copy notes, it would also turn all the notes into chain notes. I realized that the chain note keyboard shortcut is "C", which is part of the "CTRL-C" for copy. I remapped the chain note shortcut to something else as a workaround, but that isn't going to work well for the click action.

I tried downloading the source code and getting the project up and running to see if I could debug/fix it myself. I couldn't get it to load up in unity, due to some errors about missing Harmony or something. But I did notice that there's a snippet of code that might be related, on the dev branch:

https://github.com/Caeden117/ChroMapper/blob/64a099ba168fec652c5f5598e8697ed044875d36/Assets/__Scripts/Input/CMInputCallbackInstaller.cs#L45-L53

That flag about consuming input sounds very much like the problem I'm seeing -- where pressing a key combination works, but also does the action for the key binding without the modifier keys (or click event). I tried to use CML to start up the dev build, by changing the Release Channel option and restarting, but I'm not sure it worked because it shows the same version number as when I was on Stable. Anyway, when I tested it that way, the issue is still there.

Please let me know if there's anything else I can do to help diagnose or fix this. I have no Unity experience but maybe I can keep messing around trying to get the project to load properly, at least. Thanks!

XAce1337manX commented 4 months ago

That code in dev branch is part of the fix for this issue. We're hoping to merge the dev fixes into stable relatively soon™️. (#524)

asokoloski commented 4 months ago

Oh! I couldn't find another bug report for this issue, but if there is one and I didn't see it, sorry -- feel free to close this as duplicate or whatever. Anyway, thanks so much for the super-quick response, and for all the work on this useful editor. I'll keep an eye out for the next release!

asokoloski commented 3 months ago

Thank you for fixing this! I'll try it out.