Arrow Keys??

How to scan arrow keys in a c program???

Comments

  • : How to scan arrow keys in a c program???
    :
    int i;

    i = 0;
    if (kbhit())
    {
    i = getch();
    if (!i)
    i = getch() | 0x100;
    }
    return(i);

    codes for arrow keys will be:
    left arrow 0x14b
    right arrow 0x14d
    up arrow 0x148
    down arrow 0x150

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

In this Discussion