I Have set up a form to allow users to define and assign hotkeys for my application. It works, but I'm getting strange behaviour with the hotkey control in the following case:
If user selects Cntrl + a key as the hotkey, then the hotkey is correctly registered ie, when user presses Cntrl + a key after assigning, the hotkey is triggered.
HOWEVER, if user selects Alt + a key as the hotkey, pressing Alt + a key does nothing, but pressing Shift + a key works! Similarly, if user selects Shift + a key as the hotkey, pressing Shift + a key does nothing, but pressing Alt + a key works.
I believe I have correctly set up the constants properly as below:
Cntrl = 2
Shift = 4
Alt = 1
Why is the recognition of Alt and Shift being reversed by the system?? Does anyone know what's going on here and how to rectify it?