How to disable Alps touchpad while typing or when using an external mouse in Linux
To reach a desired effect on a notebook from the DELL new series is not easy. To start with, there's no specification….
A patch exists, but it's for scrolling and tapping only and you have to recompile kernel.
Full control by synaptics driver is not acessible.
Trackpoint and Touchpad behave as one device. It's a bad news, you have to use both or none.
Ghrrr...... There's what I want:
Disable internal Touchpad when using an external mouse.
Disable internal Touchpad while typing.
I don't need tapping and scrolling personally, that means I don't have to apply patch and recompile kernel :)
My solution for disabling touchpad when using an external mouse or while typing on notebook keyboard
Don't worry,
several steps are included for a testing purpose only :)
It has been tested on DELL 6410 in Debian Squeeze.
if your touchpad is not in toDisable array (on the 6th row), append it,
if your external mouse/mice is/are not in toDetect array (on the 7th row), append it,
enter your keyboard name in KeyboardName variable (on the 14th row).
Unplug your external mouse/mice.
execute command /usr/local/bin/touchpad_disable/disable_xinput state off in terminal - the touchpad should stop working (if not, your device is not correctly identified)
execute command /usr/local/bin/touchpad_disable/disable_xinput state on in terminal - the touchpad should start working (if not, your device is not correctly identified)
Plug in an external mouse.
execute command /usr/local/bin/touchpad_disable/disable_xinput auto in terminal - the touchpad should stop working (if not, your device is not correctly identified)
Unplug the external mouse.
execute command /usr/local/bin/touchpad_disable/disable_xinput auto in terminal - the touchpad should start working (if not, your device is not correctly identified)
Copy udev rules as root cp /usr/local/bin/touchpad_disable/90-disable_touchpad-ALPS.rules /etc/udev/rules.d
Reload udev rules as root udevadm control --reload-rules
Start „user-space deamon“ as user /usr/local/bin/touchpad_disable/start_disable_xinput_listen
Test it
A touchpad should be disabled now when a mouse is connected. If that's all you want, skip to the penultimate step (»Append start "user-space deamon" to your startup/session aplication.«)
Execute /usr/local/bin/touchpad_disable/touchpad_disable_on_type.py '<mouse name>' '<keyboard name>' '0.3' 0 test,
for example: /usr/local/bin/touchpad_disable/touchpad_disable_on_type.py 'PS/2 Generic Mouse' 'AT Translated Set 2 keyboard' '0.3' 0 test
you should get
.... some lines
----------------
Test devices search
Mouse found
Keyboard found
----------------
(if not, your device is not correctly identified)
Edit /usr/local/bin/touchpad_disable/disable_xinput again
Change USE_touchpad_disable_on_type=0 to USE_touchpad_disable_on_type=1 (on the 12th row)
Start „user-space deamon“ /usr/local/bin/touchpad_disable/start_disable_xinput_listen again, (if there's a runnig instance, it will be killed automatically)
Plug in an external mouse and try touchpad. The touchpad should stop working (if not, something is wrong).
Unplug the external mouse and try typing on keyboard (in deamon terminal you can see information on/off). The touchpad shouldn't work during typing (if not, something is wrong).
Append start "user-space deamon" to your startup/session aplication.
Logout/login and try again
If you don't want to disable touchpad when using an external mouse