Hand pain. Irritation and stimulation of the median nerve can lead to pain as well as an alteration in the sympathetic nerve action in the hand. The pain and the causes are similar to repetitive motions that cause carpal tunnel syndrome.
Sympathetic response. Pain can trigger a sympathetic response which will cause sweating. The question is why you are having pain. This could be from tendon or nerve irritation. Taking breaks, making sure your keyboard is set up ergonomically, and learning some nerve and tendon gliding exercises may be helpful.