xdotool how to send Ctrl + mouse wheel up to a program?

Tags:

Answer: 1

28 hours ago

In the text editor SciTE, you have to use Ctrl + Mouse Wheel up/down to temporarily change the font size; however, my mouse wheel is broken, so I thought of sending this command through a terminal command, that is, using xdotool.

I use this to find the SciTE window ID:

$ echo $(wcalc -q --ints $(wmctrl -l | grep SciTE | awk '{print $1}'))
6291463

Then, I've tried this:

xdotool windowactivate 6291463 && xdotool keydown ctrl click 5 keyup ctrl

This focuses the right window, but there are no changes in font size (with either click 4 or click 5.

I've also tried this:

xdotool keydown --window 6291463 ctrl click --window 6291463 5 keyup --window 6291463 ctrl

Command executes without any errors printed, but again, no change in font size.

What would be the right xdotool invocation, so I can send an emulation of Ctrl+Mouse Wheel Up to a program like Scite?

Added by: Ambrose Stracke

Answer: 2

19 hours ago

Just had the same problem with you.

xdotool keydown ctrl click 5 keyup ctrl seems only to scroll down. So I tweaked the command a little bit to delay the releasing of ctrl.

Now xdotool keydown ctrl click 5 && xdotool keyup ctrl works for me

Added by: Daphney Jacobi

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9