Also, I want to submit a mouse click. I want to implement this Python code in Ruby:
from Xlib.ext.xtest import fake_input
fake_input(display,X.ButtonPress,1, X.CurrentTime, X.NONE, x, 10)
which uses the XTest extension. I don't think you have support for that but I thought I'd ask. I am working around the problem by using xdotool but I'd prefer to do it directly.
%x(xdotool click 1)
I've spent a few hours today (well, all day really!), first trying to write native Xlib code and then looking for libraries and trying to fix up a FFI binding to libxtst and libxdo. However, it's messy and I've fallen back to the above one-liner for the time being.
I was trying to query and reposition the pointer but I could not find any implementation in the
xlib-objects
gem. Did I miss it?What I want to do, I achieved using
xlib
but I'd prefer to use the cleaner object layer if support exists:Also, I want to submit a mouse click. I want to implement this Python code in Ruby:
which uses the XTest extension. I don't think you have support for that but I thought I'd ask. I am working around the problem by using
xdotool
but I'd prefer to do it directly.I've spent a few hours today (well, all day really!), first trying to write native Xlib code and then looking for libraries and trying to fix up a FFI binding to
libxtst
andlibxdo
. However, it's messy and I've fallen back to the above one-liner for the time being.