In my setup, I have a slide switch. The center pin goes to the 3.3V regulator input. One pole goes to the battery, and the other pole goes to USB 5V. USB 5V also runs through a 10K resistor to bring it to a safe voltage for the IO port (there's also a 40.2k pull-down resistor so it's not floating).
In TMK you can read the current host stack in use, i.e., bluefruit/rn42/USB. You can also read if USB has been configured (handshake?) even if it's not the active stack. So, I'm thinking something like this:
EDIT:
It's entirely possible I over complicated that, and it's probably not as feature rich as another solution...
EDIT AGAIN:
Nevermind. I'm back to the issue of the usb_init function freezing the keyboard input if bluetooth is active and you plug into a USB adapter. Forgot about that. The above could have been simplified to an 'if USB NOT configured, fast charge.' Nope.