Disabling keyboard and clearing buffer after re-enabling it 
Author Message
 Disabling keyboard and clearing buffer after re-enabling it

I am busy with a project to control a machine remotely via IPX. I need
code to disable the keyboard when a hot-key is pressed on the remote
system.  I know bit 2 of port $21 must be XOR'd, but the problem comes
when something is typed on the machine being controlled. When I
re-enable the keyboard, these keypressed are then pushed back into the
keyboard buffer. I tried clearing the buffer, but some keypresses still
remain somewhere in memory. These keypresses don't appear to go through
the buffer, because after a test program using this disabling system
quits, the keys are piped directly into the source on the screen.

Could someone please tell me what I am doing wrong, and where these
keypresses are stored (not $40:$1E)

Thanks

Neil Garratt



Sun, 27 Feb 2000 03:00:00 GMT  
 Disabling keyboard and clearing buffer after re-enabling it

Quote:

> I am busy with a project to control a machine remotely via IPX. I need
> code to disable the keyboard when a hot-key is pressed on the remote
> system.  I know bit 2 of port $21 must be XOR'd, but the problem comes
> when something is typed on the machine being controlled. When I
> re-enable the keyboard, these keypressed are then pushed back into the
> keyboard buffer. I tried clearing the buffer, but some keypresses still
> remain somewhere in memory. These keypresses don't appear to go through
> the buffer, because after a test program using this disabling system
> quits, the keys are piped directly into the source on the screen.

> Could someone please tell me what I am doing wrong, and where these
> keypresses are stored (not $40:$1E)

Perhaps the easiest thing would be to hook int9 and write a
keyboard handler that just accepts the key and nothing more.

something like this

{$S-,R-,F+}
procedure int9Handler; assembler;
asm
   push ax

   in  al, $60  { get key }

   mov  al, $20 { acknowlegde interrupt }
   out  $20, al

   pop  ax
   iret         { return the proper way }
end;

i think that should do it... of cource hook it properly and stuff...

--
- Asbj?rn


http://home.sol.no/~bheid/



Mon, 28 Feb 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. clear keyboard buffer

2. code for clearing keyboard buffer

3. code for clearing keyboard buffer

4. clearing keyboard buffer

5. Clear keyboard buffer [??: pascal-l@vm.ege.edu.tr]

6. Disabling keyboard and flushing buffer

7. Disabling and Enabling Post Button

8. Enabling/disabling grid columns [query]

9. Enabling/Disabling TDBRadioGroup Items individually

10. How enable/disable a method

11. Enable/disable key fields when appropriate

12. Interrupts: Enable/Disable

 

 
Powered by phpBB® Forum Software