sco*_*lin 31 xorg software-recommendation
我希望能够在 X 显示器上显示指针的当前位置。是否有任何应用程序可以做到这一点?
Ila*_*ste 35
有一个名为 的包xdotool,它有一个名为 的应用程序getmouselocation,可从带有sudo apt-get install xdotool. 运行命令
xdotool getmouselocation
Run Code Online (Sandbox Code Playgroud)
会输出
x:1285 y:10 screen:0
Run Code Online (Sandbox Code Playgroud)
小智 12
Open a terminal and paste this:
while true; do clear; xdotool getmouselocation; sleep 0.1; done
Run Code Online (Sandbox Code Playgroud)Move the cursor over the screen and you will see live coordinates update on terminal.
xev从命令行显示了这一点。尝试以下操作。
xev
Run Code Online (Sandbox Code Playgroud)
当前坐标显示为root:(<x>,<y>)。