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热键?
更新:
几周后sudo apt-get upgrade Fn+F6现在可以工作了,所以只有如何旋转屏幕以及如何在旋转屏幕时自动禁用触摸板的问题。
我认为热键Fn+F6可以使用一段时间。
\n\n创建脚本/usr/local/bin/rotate-screen.sh
\n(我在要点处增强了该脚本,因此它也旋转 90\xc2\xb0)
#!/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\nRun Code Online (Sandbox Code Playgroud)\n\n并赋予其可执行权限:
\n\nsudo chmod +x /usr/local/bin/rotate-screen.sh\nRun Code Online (Sandbox Code Playgroud)\n\n然后
\n\n在中创建*.desktop文件/usr/share/applications/
gksudo gedit /usr/share/applications/rotate-screen.desktop\nRun Code Online (Sandbox Code Playgroud)\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;\nRun Code Online (Sandbox Code Playgroud)\n\n然后通过 Unity 启动器开始菜单运行脚本(输入“rotate-screen”)
\n\nhttps://askubuntu.com/a/446125/34298
\n| 归档时间: |
|
| 查看次数: |
34813 次 |
| 最近记录: |