4x4 membrane switch problem

I'm trying to interface a 4x4 membrane keypad (e.g., http://cgi.ebay.com/4x4-Matrix-16-Key-Membrane-Switch-Keypad-Keyboard-NEW-/370375440017?cmd=ViewItem&pt=LH_DefaultDomain_0&hash=item563c18b691) for input. I've tied 10K pullup resistors to the four row lines and wired it up in a manner that is similar to what I've seen in the tutorials on the 4x3 keypad. (I've done one project with a 4x3 and it worked fine.)

With the new keypad, I get alternating reads on the return value from a call to getKey() of values 1 followed by a 7 even though I'm not pressing any key. Other than some standard setup calls, the only call I'm making is to getKey(), and using that in a switch to determine what to do next. The call returns 1's and 7's even without a key press. I've even tried defining the keypad as a 4x3 to see if there's something in the keypad library that I'm missing, but no joy. I've checked the matrix with an ohmmeter and it checks out fine. I've also checked the breadboard for shorts, incorrect wiring, etc. a bazillion times and see nothing.

Some background: I'm pretty good on the software side of things(recently retired from Purdue University where I taught OOP), but I'm doing an old-dog-new-tricks thingie on the hardware side. I'm running Windows 7 and the 18 release of the IDE. If this is a stupid question, I apologize. If it isn't, I'd really appreciate some help.

wired it up in a manner that is similar to what I've seen in the tutorials on the 4x3 keypad.

We actually need to see exactly ow you have wired it up.

It is possible that it is not compatable with your software. As you clame to be fine with software why on earth are you using a libary for something so soimle. If you did have your own software then you could put some debug print statements and nail down your error.

I ran into this exact problem once before - turns out I had a short somewhere. Are you 100% sure you don't have any shorts?

Does the keypad make connections when a button gets pressed, or does it break the connection?

You've made sure that the 1 key and the 7 key connect and disconnect properly using your DMM when you push them?

You don't need pull-ups, the library turns the ATMega's internal pullups on.

After that, are you sure you're inputting the proper pin numbers into the library? If you had a row pin and a column pin input into the library as both row pins, it might do funky stuff.

@Grumpy:
Why reinvent the wheel? Much easier and faster to use a pre-existing, proven-to-be-working library than go and write your own, regardless of how simple it is. Unless the keypad is an on-momentary off type (instead of the typical off-momentary on type), then it's compatible - I'm using the keypad library with a 4x4 matrix right now and it's fine.

Although since things aren't working, you might want to test doing this manually using your own code to see exactly what's going on.

Grumpy:

Always believed it was easier to stand on the shoulders of others than build you own tower. I figured that the library is widely used, so kind of expected that not to be an issue.

I do have a lot of debug statements toggled in with a #ifdef DEBUG, which sends the output to the serial stream when DEBUG is defined. (Commenting out the #define DEBUG toggles the scaffolding code out of the sketch.) That's how I know I'm getting the bogus 1's and 7's.

Adrastos:

Yep, I tried without the pullups and with them and, since it made no difference, I figured the internals were in use...but I was desperate! I've checked the row-col initializer lists and they are correct. All of the keys appear to work correctly on their own (i.e., out of the sketch checked with the DMM). I think there may be a short somewhere, but I've checked that a dozen times and I'm not seeing it. Probably forest for the trees. I think I'll have a friend come over and look at it...I've probably looked at it too long. I do suspect a short, and it might actually be in the breadboard. I'll check that this weekend.

Adrastos:

I forgot: Contact is made when pressing the key, not on release. All of the keys, including 1 and 7, work fine when tested out of the sketch.