[comp.sys.ibm.pc] Caps/Num/Scroll lock tweaker wanted

mpk9172@ritcv.UUCP (Michael P. Kirby I) (02/13/88)

Hi folks.  Quick question:  Can someone post the procedure necessary to
turn on/off the caps lock, num lock, and scroll lock?  I'm sorry if it
is an easy answer -- I'm a novice.

	THANKS!

				MIKEy

mrk@gvgspd.UUCP (Michael R. Kesti) (02/23/88)

In article <205@ritcv.UUCP> mpk9172@ritcv.UUCP () writes:
>Hi folks.  Quick question:  Can someone post the procedure necessary to
>turn on/off the caps lock, num lock, and scroll lock?  I'm sorry if it
>is an easy answer -- I'm a novice.

This does the trick, but does not change the state of the lamps in the
keyboard (at least not on my 6300).  The program supplied is intended to be
used from batch procedures to force the machine into a specific lock state
prior to invocation of another application.


Name          Length    Stowage    SF   Size now  Date       Time    CRC
============  ========  ========  ====  ========  =========  ======  ====
TOGGLE.ASM        4211  Crunched   54%      1969   6 Oct 86   0:00a  12a5
TOGGLE.COM         190  Crunched   16%       160   6 Oct 86   0:00a  1cf3
TOGGLE.DOC         567  Crunched   23%       437   6 Oct 86   0:00a  ff60
        ====  ========            ====  ========
Total      3      4968             49%      2566  


============================================================================
Michael Kesti  Grass Valley Group, Inc. | "Like one and one don't make two,
P.O. Box 1114  Grass Valley, CA  95945  |  one and one make one."
UUCP:	...!tektronix!gvgpsa!gvgspd!mrk |                - The Who, Bargain


begin 660 toggle.arc
M&@A43T='3$4N05-- "4EL0<  $8-  "E$G,0   ,"=*8B=% 08(2;^K024#E
MR9$C3(JX"#*E2<$$9=R0$7A1H(R+"!4F4$$2!!2*4T!\-)AQHYF+;L*T*</0
M(<0B%^FDH<.&9L.'$2_""7.&)HL8,U86W %"!20D2YNJ2 !II(JH)<VDZ1ES
MIHX$=-Z<.=/319@Y;:@:((EU:E6V"IB23 !%SAL[:<B4F0,BC!L03::T(/(D
MI<*M._. " MBS!LW=.RR 3$D")243)X,6<("A),J34!DWMS9+QFK;4%,&2+E
M"1,FHC4O<4'U %RY;E'';?JT8$''>A/,*7-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M;XPQ1H1=G5%3:R^5%,8:'H$ QV1CC%2&&T$6>* 92-7AQAINK,30'%J%E5-"
M84P&PI!TO#@24,>Q. <;8<PQ5FQN990E&2NB 99<48IU&4A-3D8&6@IH !H 
 
end
-- 
============================================================================
Michael Kesti  Grass Valley Group, Inc. | "Like one and one don't make two,
P.O. Box 1114  Grass Valley, CA  95945  |  one and one make one."
UUCP:	...!tektronix!gvgpsa!gvgspd!mrk |                - The Who, Bargain

jonm@killer.UUCP (Jon Meinecke) (02/24/88)

In article <444@gvgspd.UUCP>, mrk@gvgspd.UUCP (Michael R. Kesti) writes:
> In article <205@ritcv.UUCP> mpk9172@ritcv.UUCP () writes:
> >Hi folks.  Quick question:  Can someone post the procedure necessary to
> >turn on/off the caps lock, num lock, and scroll lock?  I'm sorry if it
> >is an easy answer -- I'm a novice.
> 
> This does the trick, but does not change the state of the lamps in the
> keyboard (at least not on my 6300).  [...]

Some so-called 101-key "enhanced" keyboards use the state of the num lock
indicator light to determine the scan code which are sent to the system
for the arrow keys or editing keys (insert, delete, home, etc...)
which are separate from the numeric keypad.  These keyboards send the
appropriate scan codes to alter the "shift" state.  For example,
The Compaq 286 Tech Ref Manual indicates that for the "INS" key
the follow scan code sequence is issued (make/break):

	Shift active with NUM LOCK off:
		E0 F0 12 E0 70/E0 F0 70 E0 12
	Shift inactive with NUM LOCK on:
		E0 12 E0 70/E0 F0 70 E0 F0 12

An utility which only sets the BIOS data area shift state variables
and does not inform these enhanced keyboards will cause the BIOS and
the keyboard to be "out of sync" until the user presses a scroll,
num, or caps lock key.  The BIOS will then send the keyboard command
to set the indicator LEDs to what the BIOS believes is the shift state.
It should fairly easy to write a utility which both sets the ROM data
shift state variables and issues the keyboard command to set the LEDs.

This applies only to keyboards which support the "set indicator"
command.  Some earlier keyboards (which had indicator LEDs) did
not support commands from the system to the keyboard...

						JonM

Charli@cup.portal.com (03/01/88)

This teeny-tiny file is an arced uuencoded combination of two files:
REVCAPS.COM and REVKEY.COM. They will reverse your capslock and numlock
keys when they get "out of sync" with the lights. (only 11 bytes each)
section 1 of uuencode 2.3 of file revkey.arc    by R.E.M.

begin 644 revkey.arc
M&@)2159#05!3+D-/30`E"P```"8">:H,=@L```"X0`".V(`V%P!`PQH"4D56D
E3E5-+D-/30`E)0L````F`LFJ)'8+````N$``CMB`-A<`(,,:`,,:A
``
end
size      82




charli@cup.portal.com