FOR IPADS:
ipads limit the output power as a power saving featue, so there are 2 ways to get a keyboard to work with an ipad.
Either way you'll need the lightning to USB connection kit.
1. Use a keyboard that has a low power draw, basically, any keyboard that does not have or support backlighting ( PokerX works perfect for this )
plug and play, good to go.
2. For keyboards with bigger power draws, you have to trick the ipad to give you more power, to do this, you need to get a usb hub with at least 4 ports, and chain it in between the lightning to usb cable, and the keyboard. The ipad willl see the open ports and send more power out allowing your keyboard to work.
I write for my website entirely on my ipad with a pokerX, works perfectly.