For example on my recent vacation I was keyboardless for about 9 days and had some major hand pains but they seem to have dissipated now that I'm back to typing on my mechanical again.
Explain the pain, was it numbness, pins and needles in a finger or a few? Hand soreness due to arthritis perhaps (have no idea how old you are, so don't get offended with this question)?
Weather has an effect here as well, too cold and cramping up occurs easily, hence the heat is your best friend. Muscles and joints require some limber exercise's as you get older to help adjust them with any repetitive tasks required over a long period of time. (I have to do this every evening or early in the morning before my shift starts).
Also don't forget any medications that can cause that type of pain due to major side effects from beta-blockers, some anti-migraine medicines, decongestants and even excessive amounts of caffeine can cause that problem (happened to me). If you like to use amphetamines and cocaine that can cause that type of pain (don't get angry for me mentioning this because I have no idea what you are taking on the side).
If it is RSI then you're stuck with that acute pain for some time to come. Don't forget to take some Vitamin B6 from chicken, beef, wheat germ, fish, peas, spinach and eggs that will keep your tendons lubricated and hopefully avoid that major pain. I always loved fish and english spinach and so far the fingers and forearms have healed themselves over time, as long as I change the routine on how I use my fingers/hands.