-1

I heard kbhit is not a standard.

Where is standard function for keyboard check?

Please help me.

Thanks :)

BombPenguin
  • 211
  • 2
  • 3
  • 10
  • 1
    As of ANSI C standard, nothing. As of POSIX, see `tcsetattr` family of functions (together with non-blocking IO). As of Windows, see platform-specific `PeekConsoleInput` and friends. – Anton Kovalenko Dec 25 '13 at 09:28

1 Answers1

1

The keyboard does not exist in standard C11. It only knows about stdin (and a lot of computers don't have keyboards).

Keyboard access is operating system specific. See tty demystified for an historical and Unix centered approach.

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547