This is called "reverse clicky" and is the most common.
This is called "forward clicky". Apparently a true tactical switch will never click and latch itself on.
The wiring in such a tailcap is simple. Just a pair of LED and resistors wired across the switch. When the switch is off, they get powered (something on the PCB up near the LED must deliver current), but when the switch turns on (closes) they get robbed and go off.
That much is simple. The "driver board" (the PCB up near the flashlight emitter itself) will typically need to be modified to work with an illuminated tailcap. The necessary modification is a "bleeder resistor" that supplies current from the + end of the battery to the tailcap.
The big question is why my illuminated tailcap does not work with the biscotti firmware I flashed to this flashlight.
Another question is how much current this robs. My tailcap has a pair of 360 ohm resistors. The writeup below says that as little as 0.02 mA can be arranged.
Also, curiously enough, on the driver board, I measure 80K ohms between the + battery terminal and the flashlight housing -- yet this light lights up the tailcap nicely.
Tom's Electronics pages / tom@mmto.org