Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdotool key not working with dxhd #41

Open
avahe-kellenberger opened this issue Feb 27, 2021 · 11 comments
Open

xdotool key not working with dxhd #41

avahe-kellenberger opened this issue Feb 27, 2021 · 11 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@avahe-kellenberger
Copy link

What happened

Executing the following script fails with dxhd, but does not with sxhd:

#!/usr/bin/env bash

win=$(xdotool getactivewindow)
xdotool key --window "$win" super space
xdotool windowsize "$win" 800 970 
xdotool windowmove "$win" 560 295
@dakyskye
Copy link
Owner

dakyskye commented Mar 9, 2021

Oh, I might know why. Can you try it without that shebang? env shebangs are not supported IIRC, there's a flaw. I'll try to hotfix it into master in the near future.

@avahe-kellenberger
Copy link
Author

It's a separate script file that is executed, does that still matter? I'll try it out later.

@dakyskye
Copy link
Owner

dakyskye commented Mar 9, 2021

Oh, then no. Alright I'll debug it when I get some free time 👍

@dakyskye
Copy link
Owner

It's very weird. I made a new minimal Go program to try this thing and it still fails. It does the job one out of ten times 🤷‍♀️ this issue needs more attention.

@dakyskye dakyskye added bug Something isn't working help wanted Extra attention is needed labels Mar 10, 2021
@avahe-kellenberger
Copy link
Author

Hmm have you attempted this with sxhkd? It works for me but maybe it'll bring attention to something we're missing.

@dakyskye
Copy link
Owner

No I've not. I will try it now.

@dakyskye
Copy link
Owner

Does not work for me with sxhkd either.

@avahe-kellenberger
Copy link
Author

I'll test it again in a few hours, will report back what I find

@dakyskye
Copy link
Owner

Have you tested it?

@shalva97
Copy link

shalva97 commented Apr 8, 2021

my guess is that you should also send keyup evens for the shortcut you bound that script to. I have asked similar question here

There is also 2 workarounds, bind it on keyrelease or make a delay about 500ms so by the time script runs, you wont be pressing on any button on your keyboard...

@dakyskye
Copy link
Owner

dakyskye commented Apr 8, 2021

ah, definitely worth giving a try. @avahe-kellenberger just prepend the keybinding with @ to make it run the command on key release event. I'll also try those workarounds tomorrow/the day after tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants