'_DEST _CONSOLE '**NOT** Required to get the scan codes, and I haven't sorted out a way to bypass this line yet.
'I was thinking the above was required, and it's **NOT**. We read the codes just fine without it...
'We just need it so we can PRINT the results to the console, since I didn't make use of _ECHO, like an
' XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
' XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
' XXXXXXXXXXXXXXXXXX XXXXXXXX
'XXXXXXXXXXXXXXXX XXXXXXX
'XXXXXXXXXXXXX XXXXX
' XXX _________ _________ XXX What can I say?
' XX I _xxxxx I xxxxx_ I XX Even I have simple brainfarts,
' ( X----I I I----X ) From time to time!!
'( +I I 00 I 00 I I+ )
' ( I I __0 I 0__ I I )
' (I I______ / \_______I I)
' I ( ___ ) I
' I _ ::::::::::::::: _ i
' \ \___ ::::::::: ___/ /
' \_ \_________/ _/
' \ \___, /
' \ /
' |\ /|
' | \_________/ |
TOGGLE = -1 'Change TRUE/FALSE value to see the different return values for codes.
'See the INP Scan Codes at https://www.qb64.org/wiki/Keyboard_scancodes
a = ConsoleKeyhit(0) 'To retrieve the INP Scancodes as QB64 lists them
a = ConsoleKeyhit(1) 'To retrieve positive/negative codes for down/up codes
'PRINT a 'We **DON'T** require _DEST _CONSOLE if we use the _ECHO below, instead of this line. _DUH!!
IF a
= 57 THEN TOGGLE
= NOT TOGGLE
'Spacebar to Swap toggle values