Arrow Keys

I want to know how to initialize arrow keys Please help!! [b]URGENT[/b]

Comments

  • Arrow keys can't be initialized, but you can check the value
    inside a program by either a const or an equated
    literal. I've written a program to know what the keyboard
    is sending back. All you have to do is copy the program,
    compile it, and then run it. Escape key is what ends the
    program.
    [code]
    program keybrdcds; { KEYBoaRDCoDeS }
    { by Carl W. Skipworth Rev Date 2009-Jun-30 }
    uses Crt;

    var
    letter : char;

    begin
    TextBackGround( Black );
    TextColor( LightGray );
    Clrscr;
    writeln( 'This will show you the codes for the arrow keys, F-keys, Alt-keys' );
    writeln( 'and other keys' );

    repeat
    letter := ReadKey;
    If letter = #0 then begin
    letter := ReadKey;
    writeln( 'Special characters: 0, ',ord( letter ),' (',letter,')' );
    end
    else
    writeln( letter,' = ',ord( letter ) );
    until letter = #27; {Escape}

    end.
    [/code]
  • 10q mate it's been very useful!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories