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

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

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

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

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

synclient TouchpadOff=1 

(并重新启用0)

我试过xev来获取Fn + F6的键码,但按下这个组合不会产生输出。 也没有将显示器转到后面。

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

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


更新:几周后sudo apt-get upgrade Fn + F6现在正在运行,因此只有如何旋转屏幕以及如何在旋转屏幕时自动禁用触摸板的问题。

信息:

我认为Hotkey Fn + F6可以运行一段时间如果您安装了最新的Ubuntu更新。


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

创建脚本/usr/local/bin/rotate-screen.sh
(我在gist上增强了那个脚本,所以它也旋转了90°)

 #!/bin/bash # This script rotates the screen and touchscreen input 180 degrees, disables the touchpad, and enables the virtual keyboard # And rotates screen back if the touchpad was disabled isEnabled=$(xinput --list-props 'SynPS/2 Synaptics TouchPad' | awk '/Device Enabled/{print $NF}') if [ $isEnabled == 1 ] then echo "Screen is turned upside down" 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' # Remove hashtag below if you want pop-up the virtual keyboard # onboard & else echo "Screen is turned back to normal" xrandr -o normal xinput set-prop 'ELAN Touchscreen' 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1 xinput enable 'SynPS/2 Synaptics TouchPad' # killall onboard fi 

并赋予它可执行权限:

 sudo chmod +x /usr/local/bin/rotate-screen.sh 

然后

1。

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

 gksudo gedit /usr/share/applications/rotate-screen.desktop 

2。

粘贴在文字下方:

 [Desktop Entry] Type=Application Terminal=false Icon=/usr/share/icons/hicolor/48x48/apps/un-reboot.png Name=rotate-screen Exec=/usr/local/bin/rotate-screen.sh Categories=Utility; 

然后通过Unity启动器startmenu运行脚本(键入“rotate-screen”)

资源:

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

您可能想要查看此回购: https : //github.com/pfps/yoga-laptop

它修复了wifi问题,而不是工作特殊键。 屏幕旋转为WIP。

我处于完全相同的位置,仅在瑜伽3上。我发现这个线程和rubo77精彩答案,所以我开始将它调整为命令行工具,所以它更容易控制事物,只有切换你想要的东西。 它目前仍在进行中,但核心function在那里并且正在发挥作用。

回复: https : //github.com/RealOrangeOne/yoga-pal

(安装说明可在此处找到)

另外请注意,如果您的笔记本电脑有一个用于旋转屏幕的硬件按钮(在我的右侧),您可以将其绑定到呼叫命令,这意味着您可以恢复它的预期function。 如果您希望以这种方式运行它,它也可以用于替换桌面条目中的rubo脚本。