You mean, checking their status ? The GetKeyState() function in user32.dll should be able to do that:
For changing them, I thing you could try using the Keybd_Event command.
;------------------------ ;.lib "user32.dll" ; ;api_GetKeyState%(key%):"GetKeyState" ;------------------------ Const VK_CAPITAL = $14 Const VK_INSERT = $2D Const VK_NUMLOCK = $90 Const VK_SCROLL = $91 Repeat Cls Text 0, 0, "CAPS:" + ((api_GetKeyState(VK_CAPITAL) And $FFFF) <> 0) Text 0, 20, "INS: " + ((api_GetKeyState(VK_INSERT) And $FFFF) <> 0) Text 0, 40, "NUM: " + ((api_GetKeyState(VK_NUMLOCK) And $FFFF) <> 0) Text 0, 60, "SCRL:" + ((api_GetKeyState(VK_SCROLL) And $FFFF) <> 0) Flip Until KeyHit(1) End
For changing them, I thing you could try using the Keybd_Event command.