I use an anti-RSI application when this happens which auto-reminds me to take breaks and notices when I cheat (monitoring keyboard and mouse activity). I also always use an external keyboard with nice keys and an external mouse for long stretches on my laptop. I switched to mousing with my left hand instead of right. I learned dvorak, and some people swear by it, but it didn't change much. so, I switched back.
It all boils down to watching your wrists. Don't rest your fingers on the home row when you're reaching for distant keys. If your kb layout makes you abuse the weaker fingers that may become a problem though.