Bug in devc-con or my bug ? Help me, please !

I try to read Shift + cursor keys combination (Shift+Left, Shift+Home, Shift
+Right, etc.) I wrote this small test program, when I press Shift+Enter,
Shift bit is set and stdin has key Enter, but when I press Shift+Left, Left
cursor key in stdin, but shift bit isn’t set, help me please !

I use defined constants in sys/dcmd_chr.h.


#include <stdio.h>
#include <errno.h>
#include <sys/dcmd_chr.h>

void main()
int Status;
int KeyStatus;
int RetStatus;

do {
RetStatus=devctl(fileno(stdin), DCMD_CHR_LINESTATUS, &KeyStatus,
sizeof(int), &Status);
if (KeyStatus!=0x00000000)
printf("\n%08X", KeyStatus);
} while(1);

Mike Gorchak
CJSC Malva
System Programmer