How to put cursor-keys in keyboard buffer?? 
Author Message
 How to put cursor-keys in keyboard buffer??

Hi!

How can I put cursur-keys (or other extended keys) in the keyboardbuffer?

Please reply via E-mail after removing "nospam."!

Thanks!

I've got these procedures. The first works great for normal keys...

----8<--------------
Function AddChar(C: Char): Boolean;
 { Add key to keyboardbuffer }
 Var Result: Byte;
 Begin
  ASM
   Mov AH,$05;
   Mov CL,C;
   Int $16;
   Mov Result,AL;
  End;
  AddChar := (Result = 0);
 End;

Function AddScancode(SC: byte): Boolean;
 { Add key to keyboardbuffer }
 Var Result: Byte;
 Begin
  ASM
   Mov AH,$05;
   Mov CH,SC;
   Int $16;
   Mov Result,AL;
  End;
  AddScancode := (Result = 0);
 End;
----8<--------------



Wed, 18 Jun 1902 08:00:00 GMT  
 How to put cursor-keys in keyboard buffer??


Quote:
>Hi!

>How can I put cursur-keys (or other extended keys) in the keyboardbuffer?

You need to add zero to either the scan code of extended code

Quote:
>I've got these procedures. The first works great for normal keys...

>Function AddChar(C: Char): Boolean;
> { Add key to keyboardbuffer }
> Var Result: Byte;
> Begin
>  ASM
>   Mov AH,$05;
>   Mov CL,C;
    mov ch,0
>   Int $16;
>   Mov Result,AL;
>  End;
>  AddChar := (Result = 0);
> End;

>Function AddScancode(SC: byte): Boolean;
> { Add key to keyboardbuffer }
> Var Result: Byte;
> Begin
>  ASM
>   Mov AH,$05;
>   Mov CH,SC;
    mov cl,0
>   Int $16;
>   Mov Result,AL;
>  End;
>  AddScancode := (Result = 0);
> End;

Make sure you use the correct scancodes for any extended keys.

--
Pedt Scragg



Wed, 18 Jun 1902 08:00:00 GMT  
 How to put cursor-keys in keyboard buffer??
Quote:
>Make sure you use the correct scancodes for any extended keys.

Where can I find them. I know cursor left is #0 and #75 but when I add these
values it doesn't work...


Wed, 18 Jun 1902 08:00:00 GMT  
 How to put cursor-keys in keyboard buffer??
In comp.lang.Pascal.borland, Remove "nospam." uttered:

Quote:
>>Make sure you use the correct scancodes for any extended keys.
>Where can I find them.

I've emailed you a list ... if anyone else want them then let me know
via email.

Most DOS references will list the scancodes and, IIRC, the TP manuals
have a list somewhere as well.

--
Pedt Scragg

No-one is completely useless, they can always be a bad example.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to put character to the keyboard buffer.

2. Get keys from keyboard buffer............

3. Making TSR's put key info into keyboard buffer.........

4. Source Code For Using Function Keys or Cursor Keys - Help :)

5. Source Code For Using Function Keys or Cursor Keys - H

6. Where is the keyboard buffer?

7. Keyboard-Buffer

8. Extending the 15 keyboard buffer limit??

9. Keyboard Buffer Help

10. Keyboard buffer in Win95

11. Keyboard buffer

12. Keyboard Buffer.

 

 
Powered by phpBB® Forum Software