Trapping Ctrl-Alt-Del and Ctrl-Alt-Ins

Trapping Ctrl-Alt-Del and Ctrl-Alt-Ins

Post by Jeff Bo » Fri, 22 Nov 1991 22:55:31



I'm currently programming a keyboard controller which requires trapping
of Ctrl-Alt-Del (any machine) and Ctrl-Alt-Ins (Zenith).

Must I grab int09h and write my own keyboard interrupt handler, or is
there an easier way?  If the handler is necessary, how difficult will
it be (I suppose this implicitly asks "What does the normal handler
do?")?

jeff

 
 
 

Trapping Ctrl-Alt-Del and Ctrl-Alt-Ins

Post by Kevin Spenc » Sat, 23 Nov 1991 09:48:35



>I'm currently programming a keyboard controller which requires trapping
>of Ctrl-Alt-Del (any machine) and Ctrl-Alt-Ins (Zenith).

>Must I grab int09h and write my own keyboard interrupt handler, or is
>there an easier way?  If the handler is necessary, how difficult will
>it be (I suppose this implicitly asks "What does the normal handler
>do?")?

>jeff

In brief...

If you're familiar with writing interrupt handlers, write one to intercept
int09. Check for CTRL-ALT-DEL/INS by doing an inportb(0x60) to get the
scancode, and checking the BIOS shift-key location for the CTRL-ALT keys
being down. If the result is not a key-combination you wish to trap, call
the old int09 handler. If it is, OR the scancode with 0x80 and send this to
the keyboard (outportb(0x60,ax|0x80) if the scancode is in ax), then send
the scancode unchanged to the port (outportb(0x60,ax)), then send an EOI to
the interrupt controller (outportb(0x20,0x20)), then do an IRET.

--
Kevin Spencer                   _.-_|\       I know it's stolen, but
17 Winchelsea Rd NOLLAMARA     /      \      the picture's brilliant
PERTH  WA  6061 -------------> \_.--._/