@echo off
:help
cls
echo     ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
echo     ³  This batch file is to allow you to easily find the keys        ³
echo     ³  you intend to use.  Just press them and make a note of         ³
echo     ³  the numbers you get shown, and you will have the information   ³
echo     ³  you need.  Press end to quit the batch file.  You will see     ³
echo     ³  the code for end then.  It is 207.                             ³
echo     ³                                                                 ³
echo     ³ Press a key to find out the errorlevel cpaws returns for that   ³
echo     ³ key.  F1 for help, end to quit.                                 ³
echo     ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
echo.
echo.
echo.
echo     ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo     º Do you want to TURN CASE SENSITIVITY OFF?  (a is the same as A) º
echo     º      You can change your mind by pressing F1 later.             º
echo     ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
echo.
:yesno
echo                  [Y,y]es or [N,n]o  (convert letters to uppercase)
cpaws 0 c
if errorlevel  89  if not errorlevel 90  goto yes      rem Y
if errorlevel  78  if not errorlevel 79  goto no       rem N
goto notyn                      rem fell through to there anyway
:notyn
echo ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
echo ³ This prompt needs to be answered with y, n, Y, or N. ³
echo ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
goto yesno
:no
echo The following errorlevels distinguish between capital and lowercase.
rem we go on with the case sensitive call then
goto cpawscall
:start
echo   Press a key to get it's errorlevel, F1 for help, End to quit.
:cpawscall
cpaws 0 r
if errorlevel 208 goto start    rem above end
if errorlevel 207 goto end      rem end
if errorlevel 188 goto start    rem above F1
if errorlevel 187 goto help     rem F1
goto start
:yes
echo The following errorlevels do not distinguish capital from lowercase.
rem this is the case insensitive loop beginning here.
goto casecpawscall
:startcase
echo   Press a key to get it's errorlevel, F1 for help, End to quit.
:casecpawscall
cpaws 0 r c
if errorlevel 208 goto startcase    rem above end
if errorlevel 207 goto end          rem end
if errorlevel 188 goto startcase    rem above F1
if errorlevel 187 goto help         rem F1
goto startcase
:end
