This is a stupid question, I'm new to CDHK, and I hope this isn't in a FAQ somewhere (do forgive me if it is).
I was looking at the schematic above that uses a voltage regulator and a switch (debounced or otherwise) on the Vout side of the regulator, and one thing that bothers me is that the thing will burn power even nothing is switching. Now, there's a mention of people putting the switch on the Vin side, but I'm not convinced this is the right way to operate an inexpensive voltage regulator - but maybe I'm making too big of a deal of power up/down transient behavior.
In principle, one could just take a 5V battery and feed that voltage to the appropriate USB line, but I'd want to do some kind of debouncing, and again: transients. But are these transients really a big deal? Is there a scheme that would, say, use some kind of protection diode to limit the voltage on the USB line? I'm imagining a battery or series of batteries supplying 5V, a switch with a series resistor (chosen to limit current to 100mA?) and a zener diode (turn-on voltage around 5V) across the output (and maybe also a capacitor across the output as well, for filtering)? Is there an advantage/disadvantage of this compared to the regulator-based schemes?