Emulate key-combination with xdotool

keyboard shortcutsx-serverxdotoolxephyrxorg

I am using Xephyr as a nested X server. When I am in Xephyr window and pres the key combination Control_L+Shift_L, Xephyr grabs my input (mouse, keyboard). This grab can be released with Control_R+Shift_R, as in API documentation for awesome, a highly configurable X window manager.

The problem is, these key combinations do not work reliably. Sometimes I have to press repeatedly to have any effect. This is very frustrating.

Is there any way to script these key-combinations using some tool such as xdotool? Or any other tool? I would create a script which I could run once I am trapped inside Xephyr and cannot leave.

I have tried the following and that does not work (no effect):

xdotool key Control_L+Alt_L+Shift_L

Best Answer

I face the same issue. The magic trick is in the order of the keys. You have to:

  1. press and hold Ctrl
  2. press and release Shift
  3. release Ctrl

If you release the Ctrl before Shift, or use any other order, you will face the issue. Pressing those keys together at the same time makes the order random.

BTW. It doesn't depend on the WM at all. It seems to be Xephyr related.

Related Question