The Apple Magic Mouse appears to work with Ubuntu so far, but only a couple multitouch functions seem to work. With the trackpad, there are lots of other functions with utouch. What I'd really like to do is map two-finger swipes to back/forward in a browser.
-
1Try looking for `xev` and `xmodmap` – nikhil Jun 07 '12 at 10:15
-
I found xev and xmodmap. Now what? – Jonathan Jun 10 '12 at 14:47
-
Were you able to find the solution? I want to be able to go back/forward too – bakytn Oct 12 '12 at 17:40
-
I'm thinking of buying a Magic Mouse, but navigating back and forward is fundamental when browsing the web. – speakman Nov 20 '12 at 10:04
-
As far as I know, there's still no way to do this. I wish someone would make a customization tool for the Magic Mouse. – Jonathan Nov 23 '12 at 22:00
-
Maybe this blog post will help: http://blog.subutux.be/2011/02/21/the-magic-mouse-under-ubuntu/ – skarz May 18 '14 at 00:48
-
combining graphmonkey with vector-tool ?! - then your hand is catching your nose ?! – dschinn1001 Jun 05 '14 at 04:13
-
I guess i am 7 years late to this thread but has anyone found the solution for gestures since Linux kernel 5.15 officially implemented support for magic mouse 2? – VISUALSOFPOTATO Apr 30 '22 at 06:43
5 Answers
I have set up this and many other gestures with touchegg. Install it via:
sudo apt-get install touchegg
Configurate touchegg via its configuration file located here:
~/.config/touchegg/touchegg.conf
Configuration for your desired gestures would be the following.
<touchégg>
<settings>
<property name="composed_gestures_time">15000</property>
</settings>
<application name="All">
<gesture type="DRAG" fingers="2" direction="LEFT">
<action type="SEND_KEYS">Alt+Right</action>
</gesture>
<gesture type="DRAG" fingers="2" direction="RIGHT">
<action type="SEND_KEYS">Alt+Left</action>
</gesture>
</application>
It's important to follow the last hint of the FAQ if you want to setup two or three finger gestures.
synclient TapButton2=0
synclient TapButton3=0
synclient ClickFinger2=0
synclient ClickFinger3=0
synclient HorizTwoFingerScroll=0
synclient VertTwoFingerScroll=0
Create an executable shell script and fire it up on startup.
This deactivates the two and three finger taps and clicks of the synaptics driver as well as the two finger scrolling. If you want to keep the two finger tap to be the right mouse button click and the two finger scrolling you have to do it with touchegg as well.
I think the magic mouse reports itself as a trackpad as stated here.
- 1,339
- 1
- 11
- 14
-
The Magic Mouse isn't reported as a trackpad, but as a mouse. It also isn't one of the touchégg supported devices. – Jonathan Jan 25 '14 at 19:43
I'm not sure this will work with Magic Mouse, but with Magic Trackpad I successfully used xSwipe to get browser back / forward navigation, workspace switch, Scale and Expo actions.
- 119
- 3
-
1If you read the other replies in this thread, you'll see that what works for the Magic Trackpad definitely doesn't work for the Magic Mouse. They're very different devices. – Jonathan Oct 21 '14 at 19:35
Have you tried touchegg? I was able to define some gestures on my MacBook's touchpad.
- 11
- 2
-
As far as I can tell, touchégg works with trackpads, but not with mice. – Jonathan Jan 20 '14 at 23:06
Easystroke Gesture Recognition can map a gesture to an aplication. you can findEasystroke Gesture Recognition in ubuntu software centre.
-
I don't want to be able to map a pointer movement to an action, but map a movement on the mouse's surface (without the pointer moving) to an action. – Jonathan Jun 17 '14 at 03:26
At the moment of writing this, mouse driver hid-magicmouse does not report two-finger swipe any differently than one-finger. So no application level solution is possible. You have to watch the development of kernel module.
Magic Mouse is seen in system as a very basic mouse with two scrollwheels. It will not be detected by any touchpad software.
On the contrary, Apple Magic Touch is seen as a very advanced touchpad and can be assigned many more functions than as in MacOS.
- 6,401
- 1
- 34
- 42