FT817 erratic CW keying

Ignacio,
I’ve had the same problem with the the 817 (ND). I dropped the key out of my bag and into the snow, I knocked the snow off and plugged it in with the same erratic sending you described. The key jack must have still been a bit wet. I unhooked the jack, dried it off, and rolled up a bit of paper towel to clean the inside of the connector. After cleaning I hooked it up and it worked FB.
Best of Luck
Bob W2CKL