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!

simulating a shift key being pressed on a keyboard

Status
Not open for further replies.

ericode

Programmer
Oct 2, 2005
2
US
I am trying to make a program to disable the ctrl+alt+del sequence temporarily. I know that ctrl+alt+del won't work while the shift key is pressed. Is there a way to simulate this? I believe the answer lies somewhere in the Int 16h or the keyboard flags at 00417h-00418h. The first bit of the keyboard flag values is the right shift key is down. Is there a way to set that flag?
 
i believe you can set that flag, but it would be in vain
since the system will almost immediatelly overwrite the bit
with the current keyboard status, thus undoing your effort.

the best way is to "hook" int 09h (which is called every
time a key is pressed) with your own routine by using DOS
function 25h.

Your own routine would check the shift states at memory
address 417, if alt and/or ctrl set, then clear them and
save it back to address 417.

This will disable all CTRL+ALT combinations.

good luck.
 
Thanks for the advice, I shall give it a try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top