echo off rem This file tests the use of the INPUT.EXE program :start INPUT "Press one of the following keys: 2 @ r = q R Ctrl-J ESC" if errorlevel 115 goto error if errorlevel 114 echo You pressed the lower-case r key if errorlevel 114 goto end if errorlevel 113 echo You pressed the q key if errorlevel 113 goto end if errorlevel 83 goto error if errorlevel 82 echo You pressed the upper-case R key if errorlevel 82 goto end if errorlevel 65 goto error if errorlevel 64 echo You pressed the @ key if errorlevel 64 goto end if errorlevel 62 goto errro if errorlevel 61 echo You pressed the = key if errorlevel 61 goto end if errorlevel 51 goto errro if errorlevel 50 echo You pressed the 2 key if errorlevel 50 goto end if errorlevel 28 goto errro if errorlevel 27 echo You pressed the ESC key if errorlevel 27 goto end if errorlevel 11 goto error if errorlevel 10 echo You pressed the Ctrl-J key if errorlevel 10 goto end :error echo If you did not follow instructions and press one of the keys shown, echo this demonstration will not work properly! :end