-
Notifications
You must be signed in to change notification settings - Fork 24
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
[Feature Request] Command execution #9
Comments
Hi @pushqrdx and thanks for your request. Have you considered using another alternative for command execution other than xbindkeys. For example, I am using i3wm and it gives command execution capability right out of the box. I believe alternatives should exist for gnome,kde,etc. as well. |
@samvel1024 using the window manager hotkeys means that you run into the issue where media keys don't work if a context menu is open, also media keys steal focus from current window for a split second everytime you press them. however if we handle hotkeys at a level lower than X these issues will not happen |
Hmm, that sounds reasonable. One possible solution that I use is the following. Pick a key that you're not going to use (or you don't have on your keyboard). Let's say This is obviously not a clean solution, but I use this in my setup and it more or less works. |
@samvel1024 wouldn't that just result in the same issues with X, a context menu grabs the keyboard so if you are handling keyboard events on X level no shortcuts will work there, also if you handle any events on X level it will steal focus from active window |
Well, as a result KBCT will intercept any of that shortcut that you intended to map to a command, if I understand correctly. |
@samvel1024 yeah this is what i meant by using KBCT as a xbindkeys alternative (which is in your readme already), so i'll be able to create hotkeys that execute commands independent of display server, and side track the issues of handling hotkeys on Xorg level. I can't think of a scenario where i would want KBCT to execute a command AND ALSO pass the keys around, i expect that if for instance i hit VolumeDown and i have that bound in KBCT it will execute |
Yeah, for that very reason this is also in the readme 😃
To be honest, I don't think I see a lot of value in putting efforts towards command execution to kbct. But I will accept a PR if someone wants to work on this feature. |
@pushqrdx, another reason why it may be not the best idea, is that when you run something via a tool such a kbct, it will be run as root (for kbct is required to be run as root). It may have some unintended implications, like, when you try to run something session-related from different user ( There is another project that attempts to do what you want, though. |
@yunmikun2 no i just add my user account to the input group and run as normal user, playerctl works just fine (using hkd) So to be clear i already have a working solution to my problem with |
If you're on gnome, I recommend the excellent |
I would like to use this as a replacement for xbindkeys but for this, there has to be a way to execute commands, any chance to have this functionality?
The text was updated successfully, but these errors were encountered: