# question about touchpad and mouse

## ofornaro

HI list members,

I have a little question about touchpad and mouse use in a laptop. 

I have a toshiba satellite A-205 laptop fully configured. Touchpad is working well, but when i connect an usb mouse, touchpad still continues working, both in console under gpm, as under X.

I am using now the new version of Xorg server which is based on evdev, but before this upgrade, the behavior was the same. 

I wish to know if there exist a way to cancel the touchpad when connect the external mouse.

Is really a minor issue, but i feel a bit of curiosity about my device.

Thank you,

Osvaldo

----------

## jcat

There's no "off the shelf" solution that I know of.

There syndaemon to disable the touchpad when you're using the keyboard ( to prevent accidental mouse  move etc), but nothing more than that.

If you want a mini project, you could engineer a solution using udev and the "synclient" utility.

You could create a udev rule that triggers a script when you plug your mouse in, and again when you take it out.

The scripts would use synclient to disable the pad;  i.e set the synaptic config value  

```
synclient TouchpadOff=1
```

Then enable it again when you unplug the mouse with (it's obvious, but what the hell!) 

```
synclient TouchpadOff=0
```

Hope that helps  :Smile: 

Cheers,

jcat

----------

## ofornaro

Hi jcat,

Thank you for your reply.

I think i have the idea. but when i try synclient i get 

```

osvaldo@laptop ~ $ synclient -l

Can't access shared memory area. SHMConfig disabled?

```

Since the xorg-server upgrade i have not a touchpad section in xorg.conf.

I seems that if device were reconignized like a synaptics touchpad and not like a mouse, I could use the ksynaptics utility from kde.

I would back over the xorg.conf configuration and i will back ...

Osvaldo

----------

## ofornaro

Ok, even after add into xorg.conf 

Section "ServerLayout"

	Identifier        "X.org Configured"

	Screen      0   "Screen0" 0 0

	InputDevice    "Mouse0" "CorePointer"

	InputDevice    "Keyboard0" "CoreKeyboard"

        InputDevice    "Synaptics Touchpad" "CorePointer"

EndSection

Section "InputDevice"

       	Identifier      "Synaptics Touchpad"

       	Driver  "synaptics"

       	Option  "CorePointer"

       	Option  "SendCoreEvents"        "true"

       	Option  "Device"                "/dev/input/mice"

       	Option  "Protocol"              "auto-dev"

       	Option  "SHMConfig"             "on"

       	Option  "Protocol"              "auto-dev"

EndSection

...

i have no a shared memory accesible, so i think touchpad istill is unvisible from imput devices.

I continue working on it and back if get any solution.

Thanks again for the reply.

Osvaldo

----------

## VoidMage

Configure that thing in hal, obviously.

----------

## jfp

I think jcat's "udev + synclient"  is the proper way to do this. I don't know how to create the udev rule, but I think I can help with regard to the hal part.

 *Quote:*   

>  think i have the idea. but when i try synclient i get
> 
> Code:
> 
> osvaldo@laptop ~ $ synclient -l
> ...

 

You need to create a fdi file for you synaptics touchpad. Note the line "merge key="input.x11_options.SHMConfig" type="string">true</merge>"

```
zippy portage # cd /etc/hal/fdi/policy

zippy policy # cat 11-x11-synaptics.fdi

<?xml version="1.0" encoding="ISO-8859-1"?>

<deviceinfo version="0.2">

  <device>

    <match key="info.capabilities" contains="input.touchpad">

        <merge key="input.x11_driver" type="string">synaptics</merge>

        <!-- Arbitrary options can be passed to the driver using

             the input.x11_options property since xorg-server-1.5. -->

        <!-- EXAMPLES:

        Switch on shared memory, enables the driver to be configured at runtime -->

        <merge key="input.x11_options.SHMConfig" type="string">true</merge>

        <!--    Maximum movement of the finger for detecting a tap -->

        <merge key="input.x11_options.MaxTapMove" type="string">2000</merge>

        <merge key="input.x11_options.TapButton1" type="string">1</merge>

        <merge key="input.x11_options.TapButton2" type="string">2</merge>

        <merge key="input.x11_options.TapButton3" type="string">3</merge>

        <!-- Enable vertical scrolling when dragging along the right edge -->

        <merge key="input.x11_options.VertEdgeScroll" type="string">true</merge>

        <!-- Enable horizontal scrolling when dragging along the bottom edge -->

        <merge key="input.x11_options.HorizEdgeScroll" type="string">true</merge>

        <!--Enable vertical scrolling when dragging with two fingers anywhere on the touchpad -->

        <merge key="input.x11_options.VertTwoFingerScroll" type="string">true</merge>

        <!-- Enable horizontal scrolling when dragging with two fingers anywhere on the touchpad -->

        <merge key="input.x11_options.HorizTwoFingerScroll" type="string">true</merge>

        <!-- If on, circular scrolling is used -->

        <merge key="input.x11_options.CircularScrolling" type="string">true</merge>

        <merge key="input.x11_options.CircScrollTrigger" type="string">0</merge>

        <!--For other possible options, check CONFIGURATION DETAILS in synaptics man page

        -->

    </match>

  </device>

</deviceinfo> 
```

You should also remove all of the mouse, keyboard aand synaptics stuff you added to /etc/xorg.conf. They are not needed when you are using evdev.

----------

## jcat

ofornaro:   Everyone is correct.  When you have a working hal policy file for your touchpad, we can help you with the udev rule.

Cheers,

jcat

----------

## ofornaro

Ok, I understand i had a lot of troubles here.

First, new xorg-server not use x11-drivers/synaptics else x11-drivers/xf86-input-synaptics. 

I just emerge the second x11-drivers/xf86-input-synaptics and resolv some blocked packages, results in ksynaptics unoperational. Don't worry, i just elimainate it. but now, i have syndaemon functional.

So, if manually execute 

$ synclient TouchpadOff=1 

i can disable the touchpad, what partially resolv my problem. 

Thank to all.

----------

