|
NumLock on and off
procedure NumLockOn;
var KeyState:TKeyboardState;
begin
GetKeyboardState(KeyState);
KeyState[VK_NUMLOCK]:=$01;
SetKeyboardState(KeyState);
end;
procedure NumLockOff;
var KeyState:TKeyboardState;
begin
GetKeyboardState(KeyState);
KeyState[VK_NUMLOCK]:=$00;
SetKeyboardState(KeyState);
end;
//Replace VK_NUMLOCK with VK_CAPITAL or VK_SCROLL for CapsLock //and ScrollLock
|