Sending Shift+Click to a window

1,350 views
Skip to first unread message

Melvin Carvalho

unread,
Aug 6, 2010, 7:39:55 PM8/6/10
to xdotoo...@googlegroups.com
I was wondering if it's possible to send Shift + (Left Mouse) Click to a window?

I've tried xdotool an xvkbd but I've got neither to work.

I use my number pad to simulate a click so sending

key KP_5

works fine to send a left click.

But

shift+KP_5

Doesnt add the shift.

Any ideas how to get both shift and click into an app?

Thanks in advance.

Jordan Sissel

unread,
Aug 7, 2010, 11:22:10 AM8/7/10
to melvinc...@gmail.com, xdotoo...@googlegroups.com

In the latest release of xdotool, this will work:
xdotool keydown shift click 1 keyup shift

Otherwise, in older versions:
xdotool keydown shift
xdotool click 1
xdotool keydown shift

It's probably worth adding modifier support to 'click' like this:
xdotool click shift+left, or click shift+1

I'll put it on my todo list, but the above examples should help until then :)

-Jordan

> --
> You received this message because you are subscribed to the Google Groups
> "xdotool-users" group.
> To post to this group, send email to xdotoo...@googlegroups.com.
> To unsubscribe from this group, send email to
> xdotool-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/xdotool-users?hl=en.
>

Melvin Carvalho

unread,
Aug 8, 2010, 10:21:27 AM8/8/10
to Jordan Sissel, xdotoo...@googlegroups.com
On 7 August 2010 17:22, Jordan Sissel <j...@semicomplete.com> wrote:
On Fri, Aug 6, 2010 at 4:39 PM, Melvin Carvalho
<melvinc...@gmail.com> wrote:
> I was wondering if it's possible to send Shift + (Left Mouse) Click to a
> window?
>
> I've tried xdotool an xvkbd but I've got neither to work.
>
> I use my number pad to simulate a click so sending
>
> key KP_5
>
> works fine to send a left click.
>
> But
>
> shift+KP_5
>
> Doesnt add the shift.
>
> Any ideas how to get both shift and click into an app?
>
> Thanks in advance.
>

In the latest release of xdotool, this will work:
 xdotool keydown shift click 1 keyup shift

Otherwise, in older versions:
 xdotool keydown shift
 xdotool click 1
 xdotool keydown shift

It's probably worth adding modifier support to 'click' like this:
 xdotool click shift+left, or click shift+1

I'll put it on my todo list, but the above examples should help until then :)

Awesome, this worked, many thanks!
 
Reply all
Reply to author
Forward
0 new messages