hi
i am looking for a solutıon :)
i wanna find ASCII codes for some keys:
direction keys
when i try to find it
it gives me
-32,80 for upper direction
ı cant understand
where can ı fınd ASCII codes for these keys
Printable View
hi
i am looking for a solutıon :)
i wanna find ASCII codes for some keys:
direction keys
when i try to find it
it gives me
-32,80 for upper direction
ı cant understand
where can ı fınd ASCII codes for these keys
Input from the arrow keys will place their scan codes in the buffer (in DOS, at least.) You can then retrieve these scan codes with getch() and related functions. The scan codes are:
Up: 80
Down: 72
Left: 75
Right: 77
Example:
Code:int x = 0;
int y = 0;
char scancode;
if (kbhit())
{
scancode = getch();
if (scancode == 72) y--;
if (scancode == 80) y++;
if (scancode == 72) x--;
if (scancode == 75) x++;
}
printf("x = %d, y = %d), x, y);
hi
are you sure
when ı trıed to wrıte
alt+80 , ı got 'P'