5

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 I have learned here.

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
  • I don't really understand if you have tried xdotool already. According to its manual, xdotool key Control_L+Alt_L+Shift_L is supposed to work. – Teresa e Junior Mar 3 '15 at 3:27
  • @Teresa e Junior - that command does not work. – Michael Boies Mar 3 '15 at 9:44
  • Are you sure you need to use Ctrl+Alt+Shift and not only Ctrl+Shift? What does Xephyr titlebar says? My version says ctrl+shift grabs mouse and keyboard. Where did you get Xephyr from? – Arkadiusz Drabczyk Mar 3 '15 at 16:37
  • Yes, I think that three modifiers is a bit too much, to be honest. – Teresa e Junior Mar 3 '15 at 16:37
  • It can be. One more thing @MichaelBoies, sorry if this is a stupid question but do you press these keys together or do you release them one after another? Try pressing ctrl+shift at the same time, it really works reliably – Arkadiusz Drabczyk Mar 3 '15 at 16:40
4

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.

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.