Kbhit

Table of contents

  1. get @kbhit

get @kbhit

Get a key from the input keyboard buffer and return the code of it. If no key is found return -1.

set "lastcode=!@kbhit!"
if "!lastcode!" == "-1" echo No pressed key