Q:

PiTFT tactile switch #17

I have been searching for clarification on PiTFT tactile switch, and folks have always been around #18 for backlight, and adafruit's tutorial requires to solder jumper 18 at the back of the board. I have 2 types of PiTFT as follow:
2.8" assembled capacitive PiTFT for B, 
2.8" capacitive PiTFT mini kit
So I tried asking adafruit why everywhere else refers one of the tactile switches as 18 for backlight but the board is labeled #17, yet their answer was "#18 is used for the backlight. it is not brought out to the tactile switches". 
I am a newbie on hardware, trying to familiarize myself with it. Can anyone please help clarify this confusion?

A:

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

