This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Touch Pad Park

El Problema Loca

You're using your laptop, typing up a document, and you accidentally bump the touch pad. Consequently the mouse pointer moves focus to some other window, or happens to minimize or altogether close the window you're working on, or deleting or pasting something in the current window or some other window, or who knows else what. Having your mouse pointer running around randomly hitting things is like driving somewhere in your car and then, when you get where you're going, just bailing out from behind the steering wheel and allowing the car keeping running, smashing into what'll continually fly into what ever it pleases. Instead of just bailing out from behind the steering wheel, the solution is to park your car. The solution for the mouse pointer running amok is the touchpad park.

Proposed Solution

In regular usage, when you hit a (configurable) key combination, let's say <Alt-F2>, the mouse pointer is anchored in a configurable place in the bar on the very top of the screen. At the same time the touch pad is disabled. So whenever you might accidentally tap the touch pad, nothing happens. You can sanely type in your editor, switch to other windows using keyboard facilities, and do whatever without the interference of the constant accidents caused by inadvertent contact with the touchpad. When you want to use the mouse pointer again, say you're done typing and you want to use your browser or whatever, just do <Alt-F2> again. (Called a toggle: tap it once to turn on, tap it again, turn it off.)

The user could enable this feature in 'gnome-tweak-tool'. The configurable key would be selected there also... where the other such keys are configured.

A second capability of touchpad park would, when it's in effect, when the mouse pointer is parked, a small lightning bolt would flash around the mouse pointer, showing the user when he's tapping the touch pad. Text with the lightning bolt would tell him (if he happens to forget at first) which the key combination is used to get the use of the touch pad back in use... e.g. <Alt-F2> to re-enable mouse pointer or similar which when appears when the touchpad is tapped.

Initial Coding

Since first posting this suggestion to gnome developers, I've done some research and written some code to facilitate the primary functionality. The bash code below reads the current status of touchpad (enabled or disabled), then sets the touchpad to the opposite of what it was previously, i.e., toggles the touchpad's status. An additional line of code provides a visual/textual cue that this has been done.

#Toggle enable/disable touchpad.  This is to be put into keybinding, so
#when key struck, touchpad is disabled (if it's currently enabled) or
#touchpad is enabled (if it's currently disabled).
#Ken Fisler
#December 29, 2015

declare -i makestate

#Read status (enabled/disabled : 1/0) into intout:
IFS=':' read text intout <<< $(xinput --list-props "SynPS/2 Synaptics TouchPad"|grep "Device Enabled")

makestate=(${intout}?0:1)       # swap values

xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" ${makestate}

notify-send --icon computer "Synaptics TouchPad" "Device Enabled = ${makestate}"

exit ${makestate}

The above works for my laptop, but not for every laptop... why there are home developers and Gnome developers.

I've gone to Settings -> Keyboard -> Custom Shortcuts -> Shortcuts and attempted to register the executable file with the key combination <Alt-Backtick>, but this hasn't worked... that key combo persists in redundantly functioning as does <Alt-Tab>... which I don't need two instances of. If I can't get my desired key combo to function, I suppose I'll select something else less optimal.


2024-10-23 11:03