If this is not fast enough for you then you need to look at the micro manager way in the link above, but that gets complex quite quick so suggest a test build with the code as written and say 5 buttons to start with and build out from there. This will get you a system where multiple keys will be actioned in turn. Do make sure you don't get 5V on the inputs at any time or you will have a dead board. The buttons go between the pin and the gnd pin and it does not matter which way round they get wired so aim for simple and easy to fix in layout. Though because pin 13 has an LED on it will be much easier if you stick with 22 total and skip 13.
Lines in the required places, where x is the pin numbers and l is the letter you want each button to trigger. If you follow the button example you can have as many buttons as you have input/output pins, 23 by adding more