A different way to detect and count the number of keys pressed. This part of a project meant to be used with a Makey Makey to catch Candy thieves. Remember when testing your logic with a keyboard certain keyboards may not be able to detect more than 3 keys pressed at the same time. Also stay away from combinations where you have to press all four arrow keys at the same time as this often doesn't work, because keyboard manufacturers figure there is no normal use for that and save on wiring such that you can't detect 3 of the four keys being pressed. You will note I also put in a visual method to show which keys the Scratch program "detected" being pressed. You can use this to "test" your keyboard.