also show pressed key, so we can verify keyboard works with the joystick driver

This commit is contained in:
mrdudz
2018-03-07 00:19:14 +01:00
parent c0d8021fd5
commit 38fedfd78b

View File

@@ -43,6 +43,7 @@ int main (void)
unsigned char count; unsigned char count;
unsigned char i; unsigned char i;
unsigned char Res; unsigned char Res;
unsigned char ch, kb;
clrscr (); clrscr ();
@@ -90,6 +91,14 @@ int main (void)
JOY_BTN_1(j)? "button" : " ---- ", j); JOY_BTN_1(j)? "button" : " ---- ", j);
#endif #endif
} }
/* show pressed key, so we can verify keyboard is working */
kb = kbhit();
ch = kb ? cgetc() : ' ';
gotoxy (1, i+2);
revers(kb);
cprintf("kbd: %c", ch);
revers(0);
} }
return 0; return 0;
} }