To launch the Python Console type:
# python Python 2.7.3 (default, Apr 3 2013, 21:37:23) [GCC 4.7.3 20130205 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
>>> import Adafruit_BBIO.GPIO as GPIO
>>> GPIO.setup("P8_12", GPIO.IN)
>>> GPIO.input("P8_12") 0
>>> GPIO.input("P8_12") 1
So, this experiment has shown us that when the key is pressed, requesting the input value from the pin will have a value of 1 and when it is not pressed, it will be 0.