Is it possible to control the scroll bars in a window?

54 views
Skip to first unread message

Glen Duncan

unread,
Feb 17, 2017, 6:07:10 PM2/17/17
to xdotool-users
I have a Logitech G13 game controller that I would like to adapt to use for CAD (Eagle PCB) under Linux. The controller has a small joystick under the thumb position. The G13 user space driver can be configured to make the joystick send either mouse or keyboard events. I would like to have mouse events from the G13 scroll window view in Eagle. xdotool seems to be the only way to have external programs send window events to other programs, but from what I've seen in the documentation, there doesn't appear to be a way to target scroll bars. Am I missing something? Is there another tool or method I should look at? Thanks!

Daniel Kahn Gillmor

unread,
Feb 18, 2017, 2:03:49 PM2/18/17
to play...@gmail.com, xdotool-users
On Fri 2017-02-17 15:38:16 -0500, Glen Duncan wrote:
> I would like to have mouse events from the G13 scroll window view in
> Eagle.

I don't know anything about "Eagle" or "G13 scroll window", but with
xdo, you can send mouse "clicks". mouse wheel-driven scrolling is
basically a series of "clicks", iiuc.

As the documentation for xdotool(1) says:

>> click [options] button
>> Send a click, that is, a mousedown followed by mouseup for the
>> given button with a short delay between the two (currently 12ms).
>>
>> Buttons generally map this way: Left mouse is 1, middle is 2, right
>> is 3, wheel up is 4, wheel down is 5.

so if what you care about is scrolling (and not the scroll bars
themselves), maybe you can just send these scroll-triggering events to
the window with xdotool?

--dkg

Anthony Thyssen

unread,
Feb 18, 2017, 8:22:12 PM2/18/17
to play...@gmail.com, xdotool-users
I don't see why sending scroll events would be a problem.
Scroll wheels of mice send  Buttons 4 and 5 events to indicate the user has moved the scroll wheel
just send those events to the appropriate window (or sub-window).


WARNING: watch out for 'state' settings (eg: shift, ctrl, meta, super, numlock)
If these are active some applications will not recognise the event (others will).

I talk about this sort of thing in generating events (mostly for keyboard macros).



--
You received this message because you are subscribed to the Google Groups "xdotool-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xdotool-users+unsubscribe@googlegroups.com.
To post to this group, send email to xdotoo...@googlegroups.com.
Visit this group at https://groups.google.com/group/xdotool-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages