The globalKeyboardHook
class you link to has a AddModifiers(Keys key)
method with this line:
if ((GetKeyState(VK_CAPITAL) & 0x0001) != 0) key = key | Keys.CapsLock;
This code checks if Cap Lock is on and if so it ORs the key
variable which is later returned by the method.
The problem is that Caps Lock is not a modifier key and shouldn't be manipulated this way. This is the reason you're seeing the strange key values you are when Caps Lock in on.
Incidentally, only Control, Shift and Alt are modifier keys and AddModifiers()
handles these.
If you remove this line I believe you'll be fine.