RosettaCodeData/Task/Keyboard-input-Keypress-check/D/keyboard-input-keypress-check.d
2023-07-01 13:44:08 -04:00

16 lines
210 B
D

extern (C) {
void _STI_conio();
void _STD_conio();
int kbhit();
int getch();
}
void main() {
_STI_conio();
char c;
if (kbhit())
c = cast(char)getch();
_STD_conio();
}