I am creating 16 switch buttons out of 8 pins in a microcontroller. Four are set for input while the other four are set for output and they are done in multiplexing. One column is scanned with '1' while the other 3 is '0'. The problem is, when two buttons are pressed simultaneously from a different column I think they are being shorted. I have seen this image in one site similar to mine but in his case he is using '0' to one column while the other 3 are '1'.
Start with all 8 lines as inputs, make only one of the columns at a time a low output, then make it an input again before testing the next column. That way there is no high-to-low short.