mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
also show pressed key, so we can verify keyboard works with the joystick driver
This commit is contained in:
parent
c0d8021fd5
commit
38fedfd78b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user