Hi

I'm trying to use "IBM PC Keyboard Scan Codes" in Pascal which involve Decimal Pair and/or Hex Pair codes. (similar to ASCII).

Could someone please tell me how to use these in VPascal. Preferably not Turbo Pascal, but any Pascal version would be appreciated!

A 'code' example would be
PageUp button being
(00,73) (decimal pair) or
(0x00,0x49) (hex pair).

(data from http://jimprice.com/jim-asc.htm)

Thanks :D

Hi,

Do you want to know how to obtain scan codes from keyboard or how to translate them to ASCII ?

Loren Soth

either translate into ASCII or use as they for use in Pascal!

Hi

I'm trying to use "IBM PC Keyboard Scan Codes" in Pascal which involve Decimal Pair and/or Hex Pair codes. (similar to ASCII).

Could someone please tell me how to use these in VPascal. Preferably not Turbo Pascal, but any Pascal version would be appreciated!

A 'code' example would be
PageUp button being
(00,73) (decimal pair) or
(0x00,0x49) (hex pair).

(data from http://jimprice.com/jim-asc.htm)

Thanks :D

Hi Denzal,

You need to read port Hex60. The following would work in Turbo Pascal (sorry I don't know VPascal :-)). Please replace underscores (_) with spaces ( ).

uses crt;

var
__sc: byte;

begin
__clrscr;
__repeat
____gotoxy(35,12);
____sc := port[$60]; {this makes sc the value of the scan code}
____write(sc,'___');
__until sc = 1; {exit on escape character}
end.

Greetings,

YS