gsettings set org.gnome.settings-daemon.peripherals.touchpad disable-while-typing true
will disable your touchpad while you are typing and re-enable it when it feels that you are using your finger on the touchpad.
Not sure if it will fit your needs but its a solution that fits me perfectly on my laptop.
To revert to the default parameter use
gsettings set org.gnome.settings-daemon.peripherals.touchpad disable-while-typing false
If it doesn't help drop a comment, well figure out something about your touchpad.
I found a straightforward answer to my question by reading the helpful information at Ubuntu Wiki: X - Input Coordinate Transformation.
These commands can be used to align rotations of the input devices and the display:
The first command rotates the display, where can be left, right, normal, or inverted:
xrandr -o <orientation>
remap the input device:
xinput set-prop '<device name>' 'Coordinate Transformation Matrix' <matrix-elements-rowwise>
The second command remaps the input device (that is, the touchpad or the the touchscreen) where <matrix-elements-rowwise>
is 0 -1 1 1 0 0 0 0 1
, 0 1 0 -1 0 1 0 0 1
, 1 0 0 0 1 0 0 0 1
, or -1 0 1 0 -1 1 0 0 1
; corresponding to the orientations above.
The names of the touchpad and touchscreen can be found with xinput list
and either can be disabled entirely with xinput disable <device-name>
. Subsequently, xinput enable <device-name>
will re-enable the input device.
In my case, and probably for others with a Yoga 13 (also on Yoga 2 Pro), the touchscreen is called ELAN Touchscreen
and the touchpad
SynPS/2 Synaptics TouchPad
.
Thus, I put a short script in my home directory called rotate-inverted.sh
with the following content:
#!/bin/bash
# This script rotates the screen and touchscreen input 180 degrees, disables the touchpad, and enables the virtual keyboard
xrandr -o inverted
xinput set-prop 'ELAN Touchscreen' 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
xinput disable 'SynPS/2 Synaptics TouchPad'
onboard &
Then I made the script executable with
chmod u+x rotate-inverted.sh
and assigned the command ~/rotate-inverted.sh
to the keyboard shortcut Ctrl+Alt+I in
System Settings -> Keyboard.
After I logged out and logged back in, I was able to rotate the keyboard by pressing that shortcut.
I did the same type of thing for the other rotation positions, using the commands xinput enable 'SynPS/2 TouchPad'
and killall onboard
instead of xinput disable 'SynPS/2 TouchPad'
and onboard &
for rotate-normal.sh
.
Some others on this thread have discussed assigning such scripts to the extra buttons on the
Yoga — such as the lock button — as well as automatically executing them upon changing the Yoga's position; but I was not sure how to do this.
Best Answer
Info:
I think the Hotkey Fn+F6 works since some time If you install the latest Ubuntu updates.
Rotate the screen and touchscreen input 180 degrees
create the script
/usr/local/bin/rotate-screen.sh
(I enhanced that script there at gist so it rotates 90° also)
and give it executable rights:
then
1.
create
*.desktop
file in/usr/share/applications/
2.
Paste below text:
Then run the script via the Unity launcher startmenu (type "rotate-screen")
Source:
https://askubuntu.com/a/446125/34298