je cherche une commande, similaire a ngetchx(), qui me renvoi la valeur de la touche enfoncé. Mais qui ne bloque pas l' execution de mon programe lorsqu' auqune touche n' est pressée.merci.
Lionel Debroux :
2) Si, OSdequeue / kbd_queue().
kbhit checks to see if a keystroke is currently available. Any available keystrokes can be retrieved with ngetchx. If a keystroke is available, kbhit returns a nonzero integer (in fact, it returns the exactly same value as ngetchx); if not, it returns 0. Note that kbhit does not pick a keystroke from the keyboard queue
. So, kbhit will continue to return non-zero value until "keypress" flag is reset by calling ngetchx, GKeyFlush or GKeyIn.