Statistics: Posted by MikeHawk — Mon Dec 16, 2019 11:12 pm
Statistics: Posted by Alex — Tue Nov 05, 2019 1:05 pm
Code:
FUNCTION ScanKey% (scancode%)STATIC Ready%, keyflags%() ' ready = 0 re dims the array IF NOT Ready% THEN REDIM keyflags%(0 TO 127): Ready% = -1 'set up arrayi% = INP(&H60) 'read keyboard statesIF (i% AND 128) THEN keyflags%(i% XOR 128) = 0 'key releasedIF (i% AND 128) = 0 THEN keyflags%(i%) = -1 'key pressedK$ = INKEY$ 'clears keboard buffer to prevent beepsScanKey% = keyflags%(scancode%) 'reads key code sent by program END FUNCTION
Try Example 3 with key codes of keyboard listed: http://www.qb64.net/wiki/index-php/Scancodes/Statistics: Posted by burger2227 — Tue Nov 05, 2019 11:47 am
Statistics: Posted by burger2227 — Tue Nov 05, 2019 9:24 am
Statistics: Posted by Alex — Sun Nov 03, 2019 3:46 pm