Most Android devices have a single port for both connecting to the computer (USB) and charging. I have to use this OTG small cable to transfer data, but also to use a real keyboard. However, when I connect the keyboard, I cannot recharge my device while I work. Since they both use the same port, is there a way to split an OTG cable to introduce power on it, but keep the existing port so I can connect a keyboard ?
Yes, it is possible, at least technically. What you need is a cable called a OTG host cable with power, which is a double-female cable with a male micro, a female micro (which only has the power and ground connected, no data), and a female A, like this one.
Additionally, you also need software support. I know an appropriate kernel patch is available for CM10 on the Nexus 7 (here), but I don't know about any other devices.
It's possible, some phones support Battery Charging Specification 1.2 and can utilize USB ACA (Accessory charging adaptor) which support OTG + Charging at the same time. (the Acasis H027 is one such adaptor)
My phone (Motorola Moto G XT1032) is not able to auto-detect such an adaptor out of the box, but after modifying the kernel, I was able to charge it and use USB Flash Drive + USB Ethernet at the same time.