linux增加假的鼠标设备,Linux:使用虚假鼠标指针的Xautomation

我使用xinput命令创建了一个虚假的鼠标指针,如here所述,该指令产生第二个指针,该指针在我的屏幕中心悬停。Linux:使用虚假鼠标指针的Xautomation

我现在想使用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它提到,但代码是越来越难读,我走了我的深度

2013-12-08

tetris11

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值