1

I'm trying to use xdotool to configure touchpad gestures on Ubuntu 18.04 with Gnome.

This works fine:

xdotool key ctrl+alt+Down

However this:

xdotool key ctrl+alt+Up 

does not change workspaces and instead seems to output some extra characters to the terminal.

as seen in this screenshot

I also attempted to use the serial values, and the keysym values output by the xev command and the behavior is identical.

  • Is this a Wayland session? – Justice for Monica Nov 29 '18 at 4:29
  • @DKBose I'm not on my machine, but it was my impression that 18.04 ships with xorg by default, and I have not changed it. I will confirm when I get home but I am on whatever is default for Ubuntu 18.04. – dlynch Nov 29 '18 at 23:25
  • 1
    @DKBose I can confirm that I am on X11. – dlynch Nov 30 '18 at 3:13
  • Okay! The reason I asked is that there is a Wayland option the user can choose at the time of logging in. xdotool works only partially in a Wayland session even with xwayland present :( – Justice for Monica Nov 30 '18 at 3:32
  • @DKBose Thanks for the help. I found a workaround that someone posted on the xdotool github page. It looks like its a known bug. – dlynch Nov 30 '18 at 22:07
1

I found some explanation to why this happens and somewhat of a workaround.

There are several issues on the xdotool github page that mention issues like this. Apparently it is caused by a misinterpretation of keyboard configuration due to the vast number of possible configurations that xdotool is not programmed to handle, or something like that.

There is somewhat of a workaround, and it has allowed me to program my gestures. The trick is to have xdotool type something directly after issuing the command, like this:

xdotool key ctrl+alt+Up && xdotool type :

The ":" is just an arbitrary character.

Doing so executes the workspace switch now! I'll leave this up in case anybody else stumbles upon this question with my same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.