旋转触摸屏并在旋转模式下禁用 Yoga 2 Pro 上的触摸板

rub*_*o77 5 touchpad lenovo function-keys

在我的 Lenovo Yoga 2 pro 上,我安装了 Ubuntu 14.04 32 位,并将安装的 Windows 8 保留在另一个分区上。

在 Windows 中,当您将其转为平板电脑模式时,键盘和触摸板会关闭,因此您不会不小心在“平板电脑”的背面单击它。

在 ubuntu 14.04 中,只有键盘关闭,但触摸板保持活动状态。甚至Fn+F6组合也不会将其关闭。

到目前为止,我只能禁用它

synclient TouchpadOff=1
Run Code Online (Sandbox Code Playgroud)

(并用 0 重新启用)

我试图xev获取Fn+的键码,F6但按此组合不会产生任何输出。将显示器转向后面也没有。

如何在旋转或转动背面的显示器时自动禁用触摸板,并重新启用Fn+F6热键?

F6 上触摸板关闭按钮的屏幕截图


更新: 几周后sudo apt-get upgrade Fn+F6现在可以工作了,所以只有如何旋转屏幕以及如何在旋转屏幕时自动禁用触摸板的问题。

rub*_*o77 4

信息:

\n\n

我认为热键Fn+F6可以使用一段时间。

\n\n
\n\n

将屏幕和触摸屏输入旋转 180 度

\n\n

创建脚本/usr/local/bin/rotate-screen.sh
\n(我在要点处增强了该脚本,因此它也旋转 90\xc2\xb0)

\n\n\n\n
#!/bin/bash\n# This script rotates the screen and touchscreen input 180 degrees, disables the touchpad, and enables the virtual keyboard\n# And rotates screen back if the touchpad was disabled\n\nisEnabled=$(xinput --list-props \'SynPS/2 Synaptics TouchPad\' | awk \'/Device Enabled/{print $NF}\')\n\nif [ $isEnabled == 1 ] \nthen\n    echo "Screen is turned upside down"\n    xrandr -o inverted\n    xinput set-prop \'ELAN Touchscreen\' \'Coordinate Transformation Matrix\' -1 0 1 0 -1 1 0 0 1\n    xinput disable \'SynPS/2 Synaptics TouchPad\'\n    # Remove hashtag below if you want pop-up the virtual keyboard  \n    # onboard &\nelse\n    echo "Screen is turned back to normal"\n    xrandr -o normal\n    xinput set-prop \'ELAN Touchscreen\' \'Coordinate Transformation Matrix\' 1 0 0 0 1 0 0 0 1\n    xinput enable \'SynPS/2 Synaptics TouchPad\'\n    # killall onboard \nfi\n
Run Code Online (Sandbox Code Playgroud)\n\n

并赋予其可执行权限:

\n\n
sudo chmod +x /usr/local/bin/rotate-screen.sh\n
Run Code Online (Sandbox Code Playgroud)\n\n

然后

\n\n

1.

\n\n

在中创建*.desktop文件/usr/share/applications/

\n\n
gksudo gedit /usr/share/applications/rotate-screen.desktop\n
Run Code Online (Sandbox Code Playgroud)\n\n

2.

\n\n

粘贴以下文本:

\n\n
[Desktop Entry]\nType=Application\nTerminal=false\nIcon=/usr/share/icons/hicolor/48x48/apps/un-reboot.png\nName=rotate-screen\nExec=/usr/local/bin/rotate-screen.sh\nCategories=Utility;\n
Run Code Online (Sandbox Code Playgroud)\n\n

然后通过 Unity 启动器开始菜单运行脚本(输入“rotate-screen”)

\n\n

来源:

\n\n

https://askubuntu.com/a/446125/34298

\n