Try an ergnomic keyboard!
Being a professional programmer, some years ago (i was 23) i had a "typewriter's cramp" (sorry if this doesnt fit, consulted an online dictionary ;) nearly every day, some months long. I was using a good old rock-solid original IBM PS/2 keyboard (as advised in one comment).
The company i was working at had an orphaned Microsoft Natural Keyboard in stock which nobody wanted to buy (it was the first one in the "Natural" Series, very good quality, but be warned, i've heard that the newer MS Natural keyboard types are by no means of the best quality).
So i plugged in this thing and since the next _day_ i had no pain any more while typing my lines of code, a miracle! :-)
Note: such an ergonomic keyboard makes IMHO only sense if you master the (10-digit) touch system. I dont know other ergonomic keyboard models but can only recommend the MS Natural Keyboard (1st series, not being produced any more :-/).
Hope this helps someone...