From: mrdudz Date: Tue, 6 Mar 2018 23:19:14 +0000 (+0100) Subject: also show pressed key, so we can verify keyboard works with the joystick driver X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=38fedfd78bdc81032495365e7cd76665d7b3b14f;p=cc65 also show pressed key, so we can verify keyboard works with the joystick driver --- diff --git a/testcode/lib/joy-test.c b/testcode/lib/joy-test.c index 51cbb53e2..167534137 100644 --- a/testcode/lib/joy-test.c +++ b/testcode/lib/joy-test.c @@ -43,6 +43,7 @@ int main (void) unsigned char count; unsigned char i; unsigned char Res; + unsigned char ch, kb; clrscr (); @@ -90,6 +91,14 @@ int main (void) JOY_BTN_1(j)? "button" : " ---- ", j); #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; }