1

I add the xdotool commands to .xbindkeysrc. The commands for mouse work, such as

"xdotool mousemove 200 200"
  q

but I keys do not work, such as

"xdotool key x"
  q

What can be the reason that the first command works perfectly, but the second command not. When pressing Q key, instead of typing X, it does nothing (it just prevernts the default behaviour of Q key).

Mouse to key commands also work, such as

"xdotool key x"
  b:8

The problem is not the xdotool command, as the following command works in the terminal

xdotool key x

1 Answer 1

4

This works for me:

xdotool sleep 0.2 key x

I'm not sure why it seems related to timing, but perhaps due to the overhead of, in my case, xbindkeys calling sh or bash and wmctrl.

1
  • Definitely something strange going on with the timing. Even with the sleep 0.2, you have to hit the keys just right to get it to work.
    – alrob
    Commented Feb 24, 2021 at 4:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .