Quantcast
Channel: Ubuntu Forums - Apple Hardware Users
Viewing all articles
Browse latest Browse all 2868

[ubuntu] Multitouch in Ubuntu on MBA 6.1

$
0
0
Hi forum,

I'd like to share my experience in configuring multitouch on my MBA. Firstoff, both of Ubuntu 14.04 and 14.10 with kernel 3.16 are pretty good on MBA 6.1. I got no MBA 6.1/6.2-specific problem here. However, for the multitouch support, it really costed me a few nights. I tried `touchegg` but had no clue on how to make it work. After read a post on Dropbox security and how to detect user keystrokes, I tried again with a hope to find a better driver or a way to re-map the trackpad input. And, with a few different combinations (xdotool is ruled out in my case), the multitouch finally work on my MBA. My setting (yup, it's highly customizable) focuses on switching applications and workspaces. Also zoom in and zoom out, it quite helpful in browser and some code editor, e.g. sublime text.

Hereunder is the my tested solution, an updated version may be found in the file multitouch.markdown of Setup Development Environment - Linux Version on my BitBucket:

Reference
How to fix MacBook Pro touchpad on Ubuntu 14.04
xf86-input-mtrack
XEV
How to configure extra buttons in Logitech Mouse

Install `mtrack`

Code:

sudo apt-get install xserver-xorg-input-mtrack
Configure `mtrack`
Code:

sudo gedit /usr/share/X11/xorg.conf.d/50-synaptics.conf
And my configuration is as below, paste and edit them in `50-synaptics.conf`. Basically the options commented out are the default setting manually typed in from the readme in mtrack's GitHub repo. Note that you can even add your own button number such as assigning button number `20` to `TapButton4`.

Code:

# Drewfle added for mtrack
Section "InputClass"
        MatchIsTouchpad "on"
        Identifier      "Touchpads"
        Driver          "mtrack"
#        Option          "TrackpadDisable" "0"
        Option          "Sensitivity" "1.3"
#        Option            "FingerHigh" "5"
#        Option            "FingerLow" "5"
        Option            "IgnoreThumb" "true"
        Option            "IgnorePalm" "true"
        Option            "DisableOnThumb" "true"
        Option            "DisableOnPalm" "true"
#        Option            "ThumbRatio" "70"
#        Option            "ThumbSize" "25"
#        Option            "PalmSize" "40"
#        Option            "BottomEdge" "10"
#        Option            "ButtonEnable" "true"
#        Option            "ButtonIntegrated" "true"
#        Option            "ButtonMoveEmulate" "true"
#        Option            "ButtonZonesEnable" "false"
#        Option            "ButtonTouchExpire" "100"
#        Option            "ClickFinger1" "3"
#        Option            "ClickFinger2" "2"
#        Option            "ClickFinger3" "0"
#        Option            "TapButton1" "1"
#        Option            "TapButton2" "3"
        Option            "TapButton3" "2"
        Option            "TapButton4" "20"
#        Option            "ClickTime" "50"
#        Option            "MaxTapTime" "120"
#        Option            "MaxTapMove" "400"
#        Option            "GestureClickTime" "10"
#        Option            "GestureWaitTime" "100"
#        Option            "ScrollDistance" "150"
#        Option            "ScrollUpButton" "4"
#        Option            "ScrollDownButton" "5"
#        Option            "ScrollLeftButton" "6"
#        Option            "ScrollRightButton" "7"
#        Option            "SwipeDistance" "700"
#        Option            "SwipeUpButton" "8"
#        Option            "SwipeDownButton" "9"
#        Option            "SwipeLeftButton" "10"
#        Option            "SwipeRightButton" "11"
#        Option            "Swipe4Distance" "700"
        Option            "Swipe4UpButton" "16"
        Option            "Swipe4DownButton" "17"
        Option            "Swipe4LeftButton" "18"
        Option            "Swipe4RightButton" "19"
#        Option            "ScaleDistance" "150"
#        Option            "ScaleUpButton" "12"
#        Option            "ScaleDownButton" "13"
#        Option            "RotateDistance" "150"
#        Option            "RotateLeftButton" "14"
#        Option            "RotateRightButton" "15"
#        Option            "TapDragEnable" "true"
#        Option            "TapDragTime" "350"
#        Option            "TapDragWait" "40"
#        Option            "TapDragDist" "200"
#        Option            "AxisXInvert" "false"
#        Option            "AxisYInvert" "false"
EndSection

Reload the Synaptics driver configuration (the command will restart X Display Manager and log out the current session, I GUESS, it looks like a restart but not a restart).
Code:

sudo restart lightdm
Install Xbindkeys and Xautomation

This is the high time to hook the trackpad up with Ubuntu. Note that you may need `xev` to look up the keyboard and multitouch input.

Code:

sudo apt-get install xbindkeys xautomation
xbindkeys --defaults > $HOME/.xbindkeysrc
gedit $HOME/.xbindkeysrc

Paste and/or edit the following near the bottom of `.xbindkeysrc`:

Code:

# Drewfle Configuration
"xte 'key Super_L'"
b:2


"xte 'keydown Control_L' 'keydown Alt_L' 'key Up' 'keyup Control_L' 'keyup Alt_L'"
b:8
"xte 'keydown Control_L' 'keydown Alt_L' 'key Down' 'keyup Control_L' 'keyup Alt_L'"
b:9
"xte 'keydown Control_L' 'keydown Alt_L' 'key Left' 'keyup Control_L' 'keyup Alt_L'"
b:10
"xte 'keydown Control_L' 'keydown Alt_L' 'key Right' 'keyup Control_L' 'keyup Alt_L'"
b:11


"xte 'keydown Control_L' 'key equal' 'keyup Control_L'"
b:12
"xte 'keydown Control_L' 'key minus' 'keyup Control_L'"
b:13


"xte 'keydown Super_L' 'key w' 'keyup Super_L'"
b:16
"xte 'keydown Super_L' 'key d' 'keyup Super_L'"
b:17
# I got no idea for configuring four finger swipe left/right

# I set key 20, but don't know what to do with it...
#"xte 'key Super_L'"
#b:20

(If needed) Now customize the newly added key bindings in `.xbindkeysrc` with the help of `xev` and add/remove mouse keys in `50-synaptics.conf`


Code:

# use xev to check key or mouse key if necessary
# note: once the mouse key is bound to xbindkeys, xev would not be able detect mouse key correctly
xev


Last Step
Just `sudo reboot` to make the setting effective. I tried `exec $SHELL` but not applying the setting. Enjoy MT with UBUNTU!

Viewing all articles
Browse latest Browse all 2868

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>