Control issues with Apple's "Magic Mouse"

A user has reported that “Opt-Click” on our plugin rotary and slider controls does not reset the control to default in Logic Pro when using Magic Mouse. We are using the if (mod.A) SetValueToDefault(GetValIdxForPos(x, y)); command in OnMouseDown. It works everywhere else but not with this user’s “Magic Mouse”.

They have sent screen videos showing the control snapping to default then immediately snapping back to where it was. I first thought maybe they had automation on the control in their DAW which would cause that behavior but a screen shot showed they do not.

AFAWK, this is only happening in Logic Pro running on Macs with “Magic Mouse” - it is not happening on other Macs or Windows PCs. We have two different Macs here, Intel iMac and M1 MacBook Pro, and it behaves properly on both. The user claims no issues with any other plugin or app on his system - only OUR plugin.

Anyone else experienced this? I advised the user that this seems to be a “Magic Mouse” problem but they insist it is a bug in our plugin. Please advise. Thank you.

Hey, I did notice the same and…
In IGraphicsMac_view.mm search for: - (void) scrollWheel and replace it with this

- (void) scrollWheel: (NSEvent*) pEvent
{
  if (mTextFieldView) [self endUserInput ];
  IMouseInfo info = [self getMouseLeft:pEvent];
  float d = [pEvent deltaY];
	if (d == 0) // might be magic mouse
		return;
  if (mGraphics)
    mGraphics->OnMouseWheel(info.x, info.y, info.ms, d);
}

Worked for me :ok_hand:

Thank you for the info. What does this do and what is unique about the “magic mouse” that requires this?

Did implementing this change have any side effects AFAYK, in other words, is there any reason NOT to make this change?

@olilarkin posted issue #985 to GitHub about a year ago with what may be a similar issue. Maybe this will fix both issues?

no side effects on my end. works fine with trackpad, magic mouse and regular mouses. magic mouse doesn’t have scroll wheel “position” sensor, so each time you scroll with it, it returns to zero instantly - on touch. so if (d==0) return; solved it for me after checking into it.

1 Like