Carpal Tunnel Syndrome isn't directly caused by typing on the keyboard but too much typing can lead to carpal tunnel syndrome forming due to bursitis or other inflammation of the wrists joints.
If your wrists or hands are beginning to hurt while typing or using the mouse you should stop and take a break from typing.
A wrist pad for your keyboard can also help alleviate pain and prevent carpal tunnel syndrome too.
The way carpal tunnel syndrome is brought on is that typing can cause bursitis or tendinitis to flare up which then leads to the narrowing of the carpal tunnel which causes carpal tunnel syndrome.