I'm writing the following code in Pascal :
program console;
uses crt;
var
x,y :integer;
key:char;
begin
x := 0;
y := 0;
Repeat
Write('Enter a key : ');
key := readkey;
case key of
{ 72 ==> up key ; 80 ==> down key }
#75 : x := x-1 ;
#77 : x := x+1;
end;
until (key = #27); // Esc
writeln;
write('The new position of x is : ',x);
end.
I want if the user clicks on the enter key then i will perform some actions . but i ignore the scancode the enter key . So does anyone know its scan code ?