I've tried a lot of keyboards over the years – ergonomic ones, such KA2 and Glove80 (now) absolutely did solve my RSI issues. Pain may have many issues, such joints, posture problems (pinching nerves in shoulders/elbow) but getting a proper chair and ergonomic split keyboard is still my number 1 advice. Also more sport, if it is not too severe.
Going to a doctor should also be high on the list, but unfortunately, I have yet to see one willing to do a proper diagnosis. My experience there is more than mixed, so you have to experiment yourself.