Showing posts with label Synaptics touchpad. Show all posts
Showing posts with label Synaptics touchpad. Show all posts

Sunday, May 16, 2010

Adjust Synaptics Touchpad in Lucid Lynx

Until Lucid Lynx, HAL was used to control certain settings. For example, to adjust the Synaptics Touchpad on a laptop, settings could be put into /etc/hal/fdi/policy/11-x11-synaptics.fdi (see my previous post). However, HAL was removed in Lucid. How, then, does one make these adjustments to a Synaptics Touchpad? ... by using xinput.

I created a folder named .synaptics in my home directory (/home/myuser/). Then I made a text file named touchpad_adjustments.sh (filename doesn't really matter) which contained the following (the xinput lines beginning with # are adjustments I left in that I may want to easily enable later): (SEE UPDATE AT END OF THIS POST TO VIEW MOST RECENT ADJUSTMENT FILE I USE.)

#!/bin/bash
#
# list of synaptics device properties http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html#sect4
# list current synaptics device properties: xinput list-props '"SynPS/2 Synaptics TouchPad"'
#
sleep 5 #added delay...
# xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 1
# xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 4
# xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 9 # Below width 1 finger touch, above width simulate 2 finger touch. - value=pad-pixels
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Area" 0, 0, 0, 4800 # set sensitive area of touchpad - value=left, top, right, bottom
xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 1 0 0 # vertical, horizontal, corner - values: 0=disable 1=enable
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 300 # stabilize 2 finger actions - value=pad-pixels
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Tap Action" 0 0 0 0 1 2 3 # pad corners rt rb lt lb tap fingers 1 2 3 (can't simulate more then 2 tap fingers AFAIK) - values: 0=disable 1=left 2=middle 3=right etc. (in FF 8=back 9=forward)
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 1 0 # vertical scrolling, horizontal scrolling - values: 0=disable 1=enable
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling" 1
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling Trigger" 3

exit


Then I made sure it had execute permissions by running:

chmod ug+x /home/myuser/.synaptics/touchpad_adjustments.sh

After that, to make sure it ran every time I started a session, I went to System > Preferences > Startup Applications and chose "Add," then gave it this filename for the command.

Update: The most current version of touchpad adjustment file I use is:

#!/bin/bash
#
# list of synaptics device properties http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html#sect4
# list current synaptics device properties: xinput list-props "SynPS/2 Synaptics TouchPad"
# To get list of devices and IDs, do xinput list
#
sleep 5 #added delay...
# xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 1
# xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 4
# xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 9 # Below width 1 finger touch, above width simulate 2 finger touch. - value=pad-pixels
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Area" 0, 0, 0, 4800 # set sensitive area of touchpad - value=left, top, right, bottom
xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 1 0 0 # vertical, horizontal, corner - values: 0=disable 1=enable
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 300 # stabilize 2 finger actions - value=pad-pixels
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Tap Action" 0 0 0 0 1 2 3 # pad corners rt rb lt lb tap fingers 1 2 3 (can't simulate more then 2 tap fingers AFAIK) - values: 0=disable 1=left 2=middle 3=right etc. (in FF 8=back 9=forward)
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 1 0 # vertical scrolling, horizontal scrolling - values: 0=disable 1=enable
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling" 1
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling Trigger" 3

exit

Saturday, February 13, 2010

Adjust Sensitive Area of Synaptics Touchpad - Karmic Koala Ubuntu 9.10

Sometimes you may want to adjust the sensitive area (or other settings) of your touchpad. To do so type "synclient -l" in a terminal and you will get a list of options. At the bottom you should see AreaLeftEdge AreaRightEdge AreaTopEdge AreaBottomEdge which are probably set to 0. If you change these to a nonzero value the you it will define the edge of the touchpad. Use your LeftEdge RightEdge TopEdge BottomEdge values as references because they are close to the edge of your touchpad.
After you determine the values you need then you can put them in your HAL configuration file:
/etc/hal/fdi/policy$ cat 11-x11-synaptics.fdi

<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.touchpad">
<merge key="input.x11_driver" type="string">synaptics</merge>
<merge key="input.x11_options.SHMConfig" type="string">On</merge>

<merge key="input.x11_options.EmulateTwoFingerMinZ" type="string">40</merge>

<merge key="input.x11_options.VertTwoFingerScroll" type="string">true</merge>
<merge key="input.x11_options.HorizTwoFingerScroll" type="string">false</merge>
<merge key="input.x11_options.JumpyCursorThreshold" type="string">300</merge>
<merge key="input.x11_options.AreaBottomEdge" type="string">5000</merge>
<merge key="input.x11_options.TapButton1" type="string">1</merge>
<merge key="input.x11_options.TapButton2" type="string">3</merge> <!--two finger tap -> middle click(3) -->
<merge key="input.x11_options.TapButton3" type="string">2</merge> <!--three finger tap -> right click(2). almost impossible to click -->
</match>
</device>
</deviceinfo>