Comments

: I want to know if there is any kind of hack that locks the keyboard : but i want to use it from a program made in pascal.:

There are two ways to disable the keyboard. The preferable one is to hijack the keyboard interrupt ( int 9h ) by redirecting to a routine which will only generate an EOI ( end of interrupt ) signal to the 8259 programmable interrupt controller chip. There is an other way, a quick and dirty method by turning the bit 1 on port 21h, which is the programmable interrupt controllers mask register. ( Bit 0 is IRQ0, Bit 1 is IRQ1 (<-- the keyboard ), Bit 2 is IRQ2 ( cascade for IRQ8..15), Bit 3 is IRQ3 ( COM2/COM4 )... and so on...) There is a problem, that is not possible to flush the keyboard buffer after re-enabling the keyboard using this method :-( See example:[code][blue]uses crt,dos;