I admit I can be a bit of a sucker when it comes to electro-textile stuff. I see the word 'wearable' in front of any traditional electronic component and I have to investigate. Which is how I came to possess the Wearable Keypad
from SparkFun. I finally got around to using it recently, so here's the low-down.
It's a thick piece of rubber, glued together and sealed with silicon gel type stuff. It has six wires (about a metre long) coming from it. One wire is not connected (NC), one is ground (GND), one is for setting the brightness of the red LEDs behind the keypad (LEDR), and the other three (p5.1, p5.2, p5.3) are for the button presses. And as mentioned in the comments (of the product page) the order of the wires is backwards to that as shown in the datasheet.
Wait, you say, three wires for five buttons? What's going on? Seems to be a bit of fancy multiplexing, although the details are beyond me. I have however, managed to get it all to work for me, and have edited the Example Code provided by SparkFun to, shall we say, neaten up things a bit? Basically, I found that in the provided code I was getting spurious results; when I'd press 'down' I'd often get a 'left' or 'right' for no apparent reason. So I've added a few extra checks, that while they may slow the code down a bit, ensure clean
detection of button presses. All the extra stuff to do with the LEDs I've stripped out. You may not need it, but here it is in case you do. (Also, your millage may vary, and as such you may need to edit this code to work just right for you.)
But give the SparkFun example code a go too. It's oddly satisfying to play with the LEDs.( Let's go )
I have to say though, I was a bit surprised that the keypad came with such long wires, and unfinished ones at that. While it works well with an Arduino Uno, it doesn't do so well with the Arduino Lilypad. I'm going to have to come up with a suitable interface to get the two to play well together. (And yes, this is part of a larger project...)