哪个应用程序会显示鼠标光标的当前坐标?

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)

  • 可能“watch xdotool getmouselocation”是大多数人正在寻找的。 (13认同)

小智 12

  1. Install xdotool
  2. 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.

  • 或`watch -n 0.1 "xdotool getmouselocation"` (4认同)

kyl*_*leN 3

xev从命令行显示了这一点。尝试以下操作。

xev
Run Code Online (Sandbox Code Playgroud)

当前坐标显示为root:(<x>,<y>)

  • 似乎“xev”只显示当鼠标光标指向“xev”打开的窗口时的位置。 (6认同)
  • @kcpr,什么?我在终端窗口中没有看到任何保存“xev”数据的“root:(&lt;x&gt;,&lt;y&gt;)”。 (2认同)