You are not logged in.

#1 2021-12-16 23:12:53

millus
Member
Registered: 2019-07-21
Posts: 244

Why does this xdotool sequence not work?

I use CTRL+ALT+keys to switch between workspaces. Usually I hold down these two shiftkeys and tap the switching key multiple times. However, after each switch I want to automatically execute an "alt+tab" on the workspace reached. So my script does this after each workspace switch:

#release the two shift+keys that I'm currently still physically holding down
xdotool keyup alt
xdotool keyup ctrl

#simulate alt+tab
xdotool keydown alt key Tab; xdotool keyup alt

#press the two shift+keys again so the system's keyboard state is consistent again with me physically holding them down still                
xdotool keydown alt
xdotool keydown ctrl

Now everything in this script works EXCEPT for the two final keydowns again to restore consistent shiftkey state. Why is that? How can I fix this?

Offline

#2 2021-12-17 08:16:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,365

Re: Why does this xdotool sequence not work?

I guess it actually works but the desktop switcher lost the state. Try to monitor the input w/ "xev -event keyboard" and check the state of the tab presses (should be 0xc or 0x1c, 0x10 is numlock)
This is just an xy to https://bbs.archlinux.org/viewtopic.php?id=272250 ?

Offline

#3 2021-12-28 10:12:44

millus
Member
Registered: 2019-07-21
Posts: 244

Re: Why does this xdotool sequence not work?

Thanks for all your help, there should be a way to donate to you or something for appreciation xD

Offline

#4 2021-12-28 13:38:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,365

Re: Why does this xdotool sequence not work?

I'm doing this for personal entertainment, but you can donate to archlinux or buy merch, https://archlinux.org/ - right side column under "support".

However afaics we've not resolved this one either way (neither this nor the actual https://bbs.archlinux.org/viewtopic.php?id=27225 ) - have we?

Offline

#5 2021-12-28 14:30:07

millus
Member
Registered: 2019-07-21
Posts: 244

Re: Why does this xdotool sequence not work?

Right, the problem is, I definitely take note of everything said here, just after these sessions of googling/trying/"hacking" for hours to solve "problems" I always get a burn out and need some time off from and distance before I'm back in the mood to actually try them out and "waste" moar hours........ that's why these things tend to drag out a lot.
(ps: That wine thread you linked is not from me.)

Last edited by millus (2021-12-28 17:50:46)

Offline

Board footer

Powered by FluxBB