Palm Rejection Service - Experimental
I have managed to put together a hack for disabling the mouse when using the keyboard. Let's call it experimental for now, although it works just fine for me (no problems yet).
It is a system service that directly reads the keyboard event device, which I assume it is the same for you all as it is for me:
(if not, the service is a bash script, so feel free to edit it).
When keyboard activity is detected, the mouse is disabled -- when the keyboard activity stops, the mouse is re-enabled. Keyboard activity is checked for every 1 second.
Unfortunately, the minimum delay I could manage was 1 second -- this is due to a limitation of the bash "read" command, sorry guys.
Perhaps I can whip up something better in C if I can find the time.
Copy the script into your /etc/init.d/ directory
$ sudo cp ~/Downloads/xps_touch_man.sh /etc/init.d/
Remove the .sh extension (ubuntuforums.org required it, sorry)
$ sudo mv /etc/init.d/xps_touch_man.sh /etc/init.d/xps_touch_man
Make the script executable
$ sudo chmod 755 /etc/init.d/xps_touch_man
The root user will need to be able to access your Xsession. So, with the user you normally login as, run the following command:
$ xhost SI:localuser:root
Start the service:
$ sudo service xps_touch_man start
If all went well, you will now have some form of touchpad protection when typing. Like I said earlier, it takes 1 second for the touchpad to come back on, so it can be a little annoying (depending on what you are doing). Again, this is a limitation of bash and I apologize. Help regarding this issue is appreciated.
Personally, I recommend just starting the service if you have a lot of typing to do and then stopping the service when you are done.
As you may have guessed, stopping the service is just as easy as starting it:
$ sudo service xps_touch_man stop
 Keyboard polling delay is 1 second
 Assumes keyboard on /dev/input/event4
 The service generates a log file in /var/log/xps_touch_man.log
 The service generates an error log in /var/log/xps_touch_man.err
 Step 4 and Step 5 will have to be repeated if/when you reboot to re-enable the palm rejection. (See next post)