I'm not sure I understand the confusion.
Gpios 17, 22, 23, and 27 (21 on early models) are brought out on the unit exterior. You can connect buttons to those pads which you can then read in software.
Gpio 18 is apparently used to switch the backlight on and off. There is no need to bring that out to the unit exterior. It is assumed you'll control the backlight in software.
I give an example using my pigpio library.
#!/usr/bin/env python
# read_write.py
# 2015-06-06
# Public Domain
import time
import pigpio
BUTTON=23
BACKLIGHT=18
def cbf(gpio, level, tick):
if gpio == BUTTON:
print("set BACKLIGHT to {}".format(level))
pi.write(BACKLIGHT, level)
pi = pigpio.pi() # open connection to pigpio
pi.set_mode(BUTTON, pigpio.INPUT)
pi.set_mode(BACKLIGHT, pigpio.OUTPUT)
# create callback to call whenever BUTTON changes state
cb = pi.callback(BUTTON, pigpio.EITHER_EDGE, cbf)
start = time.time()
while (time.time()-start) < 60.0: # run for 60 seconds
time.sleep(1)
cb.cancel() # cancel callback
pi.stop() # close connection to pigpio
Save the file as read_write.py and make executable (chmod +x read_write.py).
To run make sure the pigpio daemon is running (sudo pigpiod) then enter
./read_write.py
To test without a working switch enter the following commands at the command line (a different shell to that running the script).
pigs w 23 0
pigs w 23 1
pigs w 23 0
to get the following output
set BACKLIGHT to 0
set BACKLIGHT to 1
set BACKLIGHT to 0