-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
[BUG]: Cannot bind "win" key in whkdrc #6
Comments
This is quite a difficult problem and a moving goal because Microsoft really don't want users to be able to use
There are some documented ways to disable certain system Ultimately, you'll have to disable any pre-existing hotkeys registered by Windows yourself before trying to set them with I may look into adding a section to the configuration and the parser to allow users to explicitly specify global hotkeys they wish to disable in the future (if |
Mostly for my own ref in the future, this is how AHK handles |
Thanks for your explanation. So currently whkd does not handle win key at all? there is no way to bind it in whkdrc? I am kind of used to bind it in other window managers like yabai or bspwm. alt key is heavily used in applications, there could be lots of conflicts if I have to use alt key bindings for komorebi. |
For this particular use case (calling |
so you meant there is a way to bind win key in whkd? what is the exact way of doing this? what's the name for win key? like alt/ctrl/shift? I have disabled win key bindings in system registry, I don't use them anyway. |
You can bind it using # ~/.config/whkdrc
.shell pwsh
win + y : echo $((1 + 2) * 6) Then I can start ❯ whkd
# pressing win+y here
echo $((1 + 2) * 6)
18 However, as I mentioned, it may be the case that the registry modifications suggested by Microsoft are not completely up to date for disabling all system hotkeys that use |
Yes you are right, the
|
IDK if it helps, but MSFT powertoys fancyzone is capable of overriding the win left/right/up/down hotkeys. (Found this because right now when I use the Win/left etc hot keys, komorebic doesnt seem to notice the window has been moved, so was hoping to use whkdrc to handle that. |
if you want to know a bit more about how autohotkey is handling windows keys, I made a regex that should match most of the cases where they are referencing the code (and exclude a ton of non relevant matches) for githubs code search |
Thank you for this explanation. This issue is coming up in using I'm wondering: would using |
i think you can make a low level hook that intercepts the win key press, instead of trying to "register it"? it runs as a daemon anyways it should listen to a mapped keypress then perform a command that is mapped to that keypress. auto hotkey does that and has absolutely no issues with binding anything to a win key. i wanted to start using tiling window managers and check out your TWM,but this just holds me back. |
You can also use AHK with komorebi, and you're free to open a PR to whkd implementing your suggested approach. |
I tried to bind the "win" key in ~/.config/whkdrc, I tried to change
alt
towin
orsuper
, but it does not work. How exactly can I change alt to win key in the config file?To Reproduce
Steps to reproduce the behavior:
Expected behavior
win key should be able to be bound for shortcuts like AHK
Screenshots and Videos
Add screenshots and videos to help explain your problem.
Operating System
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000
Additional context
Add any other context about the problem here.
In particular, if you have any other AHK scripts or software running that handle any aspect of window management, manipulation or hotkey binding
The text was updated successfully, but these errors were encountered: