measuring jack themes technologies tooltips linux measuring jack themes technologies tooltip linux limejack claim limejack limejack

Start | Language  de en fr | Menu | Map | Search

You are here: start » en » obsolete » clickpad

Using Synaptics ClickPad(TM) with Debian on Lenovo Thinkpad E531

DELETEME It is better to use some keyboard key as mouse buttons via xte. Disable the ugly clickpad.

On Lenovo Thinkpad E531 a TrackPoint and a ClickPad are mounted. There are no mouse buttons.

If you use the TrackPoint as mouse the ClickPad can emulate the mouse buttons.

The following script should be started on X11 session via autostart. At first it disable the ClickPad as mouse by synclient TouchpadOff=1.

synclient TouchpadOff=1
synclient -m 100 | while read aaa
  if echo "$aaa" | grep -vqis 'time' 
    xval=`echo $aaa | cut -f2 -d ' '`
    yval=`echo $aaa | cut -f3 -d ' '`
    zval=`echo $aaa | cut -f4 -d ' '`
    hand=`echo $aaa | cut -f5 -d ' '`
    maus=`echo $aaa | cut -f7 -d ' '`
    test "${xval}" -gt '3800' && test "${yval}" -lt '2800' && button='3' ;
    test "${xval}" -lt '2600' && test "${yval}" -gt '3800' && button='2' ; 
    test "${oldmaus}${maus}" == '01' && xte "mousedown ${button}" ;
    test "${oldmaus}${maus}" == '10' && xte "mouseup ${button}" ;
    test "$zval" -lt '90' && echo "${xval} ${yval} ${zval} ${hand}"

Every 100ms synclient gets informations about the ClickPad stored into variable aaa. After a value separation it checks the pressed button as area on Clickpad. The top right area is button 3 and the bottom left area is button 2. The rest area is button 1. If ClickPad is pressed xte emulate the button differed by press or release.

I'm a old unhasty boy and 100ms sample time are enough for me. But you can choose up to 20ms. Have fun!

Disclaimer | Impressum | Privacy | Copyleft