[RESOLVED] Can't turn off middle mouse button for Apple Magic Mouse 2 on Fedora

Hi,

My partner has just switched from a Macbook Pro to a Framework running Fedora. He’s really happy with it, but he’s struggling to use his Apple Magic Mouse 2 on it. We haven’t been able to turn off the middle mouse button click which is present on Fedora.

The problem:
On Mac, clicking on the left side of the surface triggers a left click, and clicking on the right side triggers a right click.

On Fedora, it works the same, except clicking the middle area of the surface triggers a middle click. As a consequence, the left click area is much smaller. This means my partner is often accidentally middle clicking, making the mouse impractical for him to use.

What we’ve tried:
I tried to help him disable the middle click by following the steps from the Arch wiki:
https://wiki.archlinux.org/title/Bluetooth_mouse

We tried running this
sudo modprobe -r hid_magicmouse
sudo modprobe hid_magicmouse emulate_3button=0

But Fedora said:
modprobe: FATAL: Module hid_magicmouse is builtin.

So instead, as per the page, we created a new file:
/etc/modprobe.d/hid_magicmouse.conf
with the contents:
options hid_magicmouse emulate_3button=0

We restarted, but nothing changed, the mouse was still sending middle mouse clicks.

Following the advice here, we tried creating the file:
/etc/modprobe.d/magicmouse.conf
with the contents:
options hid-magicmouse emulate_3button=0
and then restarting. That also had no effect.

Is there anything else we can try? I’m at a loss at how I can help him any further.

Thanks in advance

Try putting it on the kernel command line like this: hid_magicmouse.emulate_3button=0

3 Likes

It worked! Thank you very much, I really appreciate your help!

For anyone else who comes here with a magic mouse:

I ran this command to turn off the middle click and to increase the scroll speed as the default one felt very unresponsive:

sudo grubby --update-kernel=ALL --args="hid_magicmouse.emulate_3button=0 hid_magicmouse.scroll_acceleration=1 hid_magicmouse.scroll_speed=40"

It would be nice if this was the default, to help new users acclimatise from MacOS without needing to try and work out how to change kernel arguments, but hopefully whoever needs this will find it.

Great !

Maybe you should make a case with the driver owner to change the default.

2 Likes

Yeah I think I will :blush: I’ll leave a note on the links in my original post as well to give a more up-to-date answer for anyone who comes across them. Thanks so much!

Edit: Couldn’t create an account on Arch Wiki to edit the page. I don’t use Arch Linux and their sign-up captcha requires you to run an arch-specific command. I did leave a new response on the Stack Overflow page though.

I think I found the github page of the kernel module hid-magicmouse, but it’s been inactive for 3 years. Even if they did change the default middle click behaviour, it’s likely to upset a portion of users who use it. I feel that the real solution would be to make an easy way to configure magic mice.

1 Like