> My second problem is to switch on and off the NUM-LOCK function.
Use this program (from the SwarTools 2.5 library ;-)
{$IFDEF VER70}
{$A+,B-,D-,E-,F-,G-,I-,L-,N-,O-,P-,Q-,R-,S+,T-,V-,X-}
{$ELSE}
{$A+,B-,D-,E-,F-,G-,I-,L-,N-,O-,R-,S+,V-,X-}
{$ENDIF}
{$M 1024,0,0}
{
KEYLIGHT 2.5
Borland Pascal (Objects) 7.0.
Copyright (c) 21-3-1993 DwarFools & Consultancy by drs. Robert E. Swart.
P.O. box 799
5702 NP Helmond
The Netherlands
Code size: 3104 bytes
Data size: 684 bytes
.EXE size: 2472 bytes
-------------------------------------------------------------------------
This program puts the keyboard leds on and/or off.
}
Type
ShiftKeys = (RShift, LShift, Ctrl, Alt, Scroll, Num, Caps, Ins);
ShiftSet = Set of ShiftKeys;
var ShiftStatus: ShiftSet Absolute $0040:$0017;
Key: String[10];
len: Byte absolute Key;
i: Integer;
begin
writeln('KEYLIGHT 2.5 (c) 1993 DwarFools & Consultancy' +
', by drs. Robert E. Swart.'#13#10);
if ParamCount = 0 then
begin
writeln('Usage: KEYLIGHT [cCiInNsS]');
Halt
end;
Key := ParamStr(1);
for i:=1 to len do case Key[i] of
'C': ShiftStatus := ShiftStatus + [Caps];
'c': ShiftStatus := ShiftStatus - [Caps];
'I': ShiftStatus := ShiftStatus + [Ins];
'i': ShiftStatus := ShiftStatus - [Ins];
'N': ShiftStatus := ShiftStatus + [Num];
'n': ShiftStatus := ShiftStatus - [Num];
'S': ShiftStatus := ShiftStatus + [Scroll];
's': ShiftStatus := ShiftStatus - [Scroll]
{ else writeln(Key[i],' option unknown!') }
end
end.
To turn it off call "Keylight n", to turn it on again call "Keylight N". It
works for me every day (I have inserted a call in my autoexec.bat)...
> -ChR
Groetjes,
Bob (bo...@dragons.nest.nl)