KeyPressed function
This project implement "function" which handles pressing buttons A and/or B Its enclosed in if-not-fKeyPressed block and leaves him just when any button is pressed. This function can recognize 6 key combination - clicked (pressed and released) button A (1)/B(2), Doublcicked button A (3) / B(4) and shift clicked A(5) / B(6). Shift click A means: press and hold B and click A. When if block is left key code in brackets is assigned to variable KeyPressed. KeyPressed can be zero when buttons are pressed in invalid combinations.