The NHotkey of WinForms does not support using Win keys as function keys
As the title suggests, do you have any solutions? Or can I make some updates to this project? Thank you!
Hi @ZheYinX,
It is indeed not supported at the moment. The Keys enum in Windows Forms doesn't have a value for the Windows modifier key (it has LWin and RWin, but that's for the keys themselves, not as modifiers).
Looking at the code, I see that I had tried to do something with LWin and RWin, but it doesn't really make sense.
I guess it might be possible to support it; it would need to use a special Keys value that's not actually defined in the enum, but that the library could expose and map to the proper modifier, e.g. something like this:
HotkeyManager.Current.AddOrReplace("Increment", WindowsKey.Modifier | Keys.Add, OnIncrement);
I'll see if I can make it work.
I implemented the change, but now I need to migrate my outdated CI pipeline to be able to release a new version 😅
This change has been released in version 4.0.0