microsoft / CsWin32

A source generator to add a user-defined set of Win32 P/Invoke methods and supporting types to a C# project.
MIT License
1.99k stars 84 forks source link

How to Generate MOD_CONTROL in RegisterHotKey function (winuser.h) #1103

Closed spartajet closed 6 months ago

spartajet commented 6 months ago

Is your feature request related to a problem? Please describe. I want to generate the constants MOD_CONTROL , MOD_SHIFT, MOD_WIN in RegisterHotKey function https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerhotkey

But when I warite MOD_* in NativeMethods.txt, I can not found these constants. So, How to do it?

spartajet commented 6 months ago

I had fond the

internal enum HOT_KEY_MODIFIERS : uint
        {
            MOD_ALT = 0x00000001,
            MOD_CONTROL = 0x00000002,
            MOD_NOREPEAT = 0x00004000,
            MOD_SHIFT = 0x00000004,
            MOD_WIN = 0x00000008,
        }