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

support for chord chains #8

Open
dakyskye opened this issue May 27, 2020 · 5 comments
Open

support for chord chains #8

dakyskye opened this issue May 27, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@dakyskye
Copy link
Owner

chord chains should be exactly same as they are in sxhkd.

@dakyskye
Copy link
Owner Author

so, when we parse the config, we need to detect the event type for binding, that would introduce four new events: chord keypress, chord keyrelease, chord buttonpress, chord buttonrelease (probably). then, set relevant xevent events, and listen for EVERYTHING. Parser has to give us a map of string, containing arrays of string. Then, in the event listeners, we get what was pressed, if the map contains the keybinding, then, we set up a timer, passed as cmdline argument, and use the array of strings, which contain the next chords. if they match, we set up the timer again, and do that continuously unless we reach the last array index. Sounds easy to implement, parsing should also be easy.

However, my local tests did not satisfy me, since "listen for everything" did not work for RootWindow, but it worked for any existent window. As soon as I get it working for root win, chords gonna be implemented.

@dakyskye
Copy link
Owner Author

dakyskye commented Jun 4, 2020

There is GrabKeyboard, SmartGrab and DumnyGrab functions, which seem to be what's needed for chord chains, but they GRAB the whole keyboard, which is just a joke, no whole keyboard grabbing gonna happen. However, the Connect methods for event structs has a parameter, to grab or not grab a keybinding. I am really wondering what happens when I do not grab a keybinding (tried it, I doubt it does anything, since it has no effect). Have to investigate.

@dakyskye dakyskye added the enhancement New feature or request label Jun 21, 2020
@dakyskye dakyskye added this to the Rewrite of dxhd milestone Jun 18, 2021
@dakyskye dakyskye removed this from the Rewrite of dxhd milestone Nov 11, 2021
@erwin
Copy link

erwin commented Dec 9, 2021

I looked into this a bit in sxhkd and I don't think that listening for everything will work.
I think that you've got to listen for every one of the possible keypresses that you may hit, individually.

@dakyskye
Copy link
Owner Author

dakyskye commented Dec 9, 2021

Thanks for the interest and this investigation 👍 right now top priority is to rewrite dxhd because current codebase is horrible and once it's done I can look into getting chord chains supported.

@Reikimann
Copy link

What is the status on this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants