Well, for now, this is how I shift keys when capslock is used:
If term\key_typed > 0 Then
If (api_GetKeyState(VK_CAPITAL) And $FFFF) = 1 Then
If (KeyDown(KEY_LEFT_SHIFT) Or KeyDown(KEY_RIGHT_SHIFT)) = False Then
If term\key_typed > 96 And term\key_typed < 123 Then
term\key_typed = term\key_typed - 32 ; switch to uppercase
EndIf
Else
If term\key_typed > 64 And term\key_typed < 91 Then
term\key_typed = term\key_typed + 32 ; switch to lowercase
EndIf
EndIf
EndIf
EndIfIt only shifts letters, either upper to lower, or lower to upper, depending if shift is pressed or capslock is on. It works fine, but only for characters. Normally, you'd expect this to also work (capslock) on the symbols over the numbers, but this technique doesn't. I would need to figure out what those codes should be, or work with a translation table of some kind, user32 (from MSDN documentation I suppose).
It's really weird that the numeric keypad doesn't work also. The - + * / stuff works, but the numbers won't, wether numlock is on or off, it just doesn't care in GetKey().
I'll use these for my numeric keypad needs:
Const VK_NUMPAD0 = $60
Const VK_NUMPAD1 = $61
Const VK_NUMPAD2 = $62
Const VK_NUMPAD3 = $63
Const VK_NUMPAD4 = $64
Const VK_NUMPAD5 = $65
Const VK_NUMPAD6 = $66
Const VK_NUMPAD7 = $67
Const VK_NUMPAD8 = $68
Const VK_NUMPAD9 = $69