我使用此处xinput
概述的命令创建了一个假鼠标指针,它产生了第二个指针,它悬停在我的屏幕中心。
我现在想使用该xte
命令使其自动化,但不幸xte
的是似乎只能控制我希望保持自由的硬件鼠标。
手册页xte
没有任何标志来指定要控制哪个指针。我想知道是否有人有任何想法?
注意:第二个指针纯粹是为了让我能够在运行图形管道的同时在同一台计算机上工作
编辑:所以通过查看 xte 源,我发现了对 XQueryPointer 的引用
Bool XQueryPointer(display, w, root_return, child_return, root_x_return, root_y_return,
win_x_return, win_y_return, mask_return)
Display *display;
Window w;
Window *root_return, *child_return;
int *root_x_return, *root_y_return;
int *win_x_return, *win_y_return;
unsigned int *mask_return;
//Arguments:
display Specifies the connection to the X server.
w Specifies the window.
root_return Returns the root window that the pointer is in.
child_return Returns the child window that the pointer is located in, if any.
root_x_return
root_y_return Return the pointer coordinates relative to the root window's origin.
win_x_return
win_y_return Return the pointer coordinates relative to the specified window.
mask_return Returns the current state of the modifier keys and pointer buttons.
来自 Xlib 类,如您所见,它只返回第一个鼠标指针,不提供另一个选项。
Edit2:查看 libx11-dev 源代码,我在 ./src/QuPntr.c 和 Xlibint.h 中发现了它的提及,但代码越来越难以阅读,我在这里没有深度