Just a point of order. 74 replies to get to this point. It's quite possible that MrDEB actually had working code at some point prior to this, as he mentioned on a couple occasions that he was getting the wrong output or duplicate output for some key presses. Everyone chalked this up to bad code (which it still may have been), but if MrDEB had noticed or mentioned that a whole column (row?) was giving the wrong results, spotting the hardware problem might have (relatively) quickly resolved this.
Dave Jones from the EEVBlog says you are lucky when a board you built doesn't work as planned. You get to hone your troubleshooting skills and learn how things work. But in order to troubleshoot something, you need a logical approach. Probably the first step when noticing that some keys yielded screwy results should have been to map out the key response. Pressing key 1 gives a 1. Pressing key 2 gives a 2. Pressing key 5 gives a 5. Pressing key 9 gives a 1. Do this for all twelve keys, and it should have been noticed that 2 rows gave duplicate results.
But not taking time to map 12 buttons, the conclusion jumped to was a software problem, which it could have been in addition to a hardware problem but it's pretty clear it was never going to work with 2 columns tied together.
A logical approach (and more than a veneer of understanding) is necessary when writing code. Even more so when it comes to troubleshooting code/hardware interaction. Just pointing out the obvious I know.