Skip to content
This repository was archived by the owner on Apr 21, 2021. It is now read-only.
This repository was archived by the owner on Apr 21, 2021. It is now read-only.

WM_HOTKEY hook #2

@retailcoder

Description

@retailcoder

Beautiful work! I think this library would be more complete if it also handled hotkeys; the API could intake a Keys flag enum value for the key combination, and internally work out the applicable +^% modifier string... or perhaps intake the hotkey string as an overload.

It also needs a way to identify hotkeys, without forcing a type on the client code - object would work, but a generic type argument would be even better. Something like this:

var key = Keys.Ctrl + Keys.Shift + Keys.R;
// generic type parameter is inferred for Register<T>
HotkeyWatcher.Register(MyHotkeyEnum.SomeCoolCommand, key);
HotkeyWatcher.Start();

When a hotkey message is captured, an event is raised and the corresponding "key" that the hotkey was registered with is sent back to the client code, who can then decide what to do.

Note: I'll submit a PR soon-ish :-)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions