I have this function: RegisterGlobalHotKey(Keys.F6, MOD_SHIFT | MOD_CONTROL); which call an API to register a global shortcut key in the system. void RegisterGlobalHotKey(Keys hotkey, int modifiers)
I created a small options form to set this keys to be variables not fixed values like this: RegisterGlobalHotKey(VARIABLE1, VARIABLE2 | VARIABLE3);
See the attached option form to understand more
The main problem is how to convert the combobox string values to Keys enum value
Assuming that you can require users to type in the name of the Enum values exactly, you can pass the text to
Enum.Parseand that will return the enum value with the specified name.