Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Testing for CAP LOCK on

Status
Not open for further replies.

CFOLKES

MIS
Jun 11, 2000
10
US
Does anyone know of a way that I can test (In Pal) to see if the user has entered my program with the Caps Lock key ON.
If so, how can I program it off.

I could use an EXECUTE statement but what are the dos commands? [sig][/sig]
 
Thanks for the tip but the routines are much too large. They contain audio drivers. All I need is something simple. [sig][/sig]
 
If you want a small DOS util that turns off Caps Lock then paste the text below into a text file named capsoff.bat
Run the batch file once. It will generate a file CapsOff.COM in the C:\ directory. Thereafter, running CapsOff.COM under DOS will turn off the Caps Lock key!
Hope this helps.
Padraig

rem ----START OF CAPSOFF.BAT----------
@echo off
> test.deb ECHO A
>>test.deb ECHO xor AX,AX
>>test.deb ECHO mov DS,AX
>>test.deb ECHO mov AX,[417]
>>test.deb ECHO and AX,FFBF
>>test.deb ECHO mov [417],AX
>>test.deb ECHO mov AX,4C00
>>test.deb ECHO int 21
>>test.deb ECHO.
>>test.deb ECHO RCX
>>test.deb ECHO 112
>>test.deb ECHO N C:\CapsOff.COM
>>test.deb ECHO W
>>test.deb ECHO Q
debug < test.deb > NUL
ERASE test.deb
rem --------END OF CAPSOFF.BAT-----
 
Thanks to Ogriofa! This works! I call it from the INIT Method upon entry to my first form. Now I can get rid of all the checks in the DEPART method! Thanks Again! [sig][/sig]
 
Now, if Ogriofa would sign on as a member we could both pass on a TipMaster vote. I used to use a similar (if not the same) COM file for setting the CAP state under PDOX40. The file was eventually lost.

Thanks, Ogriofa, for returning that which was lost!

[sig]<p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>"Suffice it to say that adding disk drives and a disk operating system to a personal microcomputer is guaranteed to increase its power dramatically."<br>
<u><b>CP/M and the Personal Computer</u></b>[/sig]
 
I noticed that the previously posted code won't work from some Windows Apps inc'l Pdx 8 (darn process terminates before hardware gets a chance) so I've made a small change which appears to solve the problem, at least on my machine.

rem ----START OF CAPSOFF.BAT----------
@echo off
> test.deb ECHO A
>>test.deb ECHO xor AX,AX
>>test.deb ECHO mov DS,AX
>>test.deb ECHO mov AX,FFBF
>>test.deb ECHO and [417], AX
>>test.deb ECHO mov AX, 0B00
>>test.deb ECHO int 21
>>test.deb ECHO mov AX,4C00
>>test.deb ECHO int 21
>>test.deb ECHO.
>>test.deb ECHO RCX
>>test.deb ECHO 115
>>test.deb ECHO N C:\CapsOff.COM
>>test.deb ECHO W
>>test.deb ECHO Q
debug < test.deb > NUL
DEL test.deb
rem --------END OF CAPSOFF.BAT-----
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top