I had this problem and managed to fix it.
Mine had nothing to do with the charger though. Typing went crazy whenever i hit the space button or the p button. Pressing p would produce a 2-3 y's and pressing space would produce a , and 2 spaces.
I cant remember EXACTLY which fixed it but i can tell you what i did -
1) Installed a cache cleaner. Cachemate. (although i have recently switched to Android Assistant). Performed a power cache cleanse with Cache Mate.
2) Went to Titanium Backup and selected "Default Input" and "wiped Data".
However, here is the thing i THINK fixed the problem -
1) Went to market place and installed gingerbread keyboard and selected it as my default input.
Switching which keyboard you use i believe resets the touchpoint settings. I prefer Gingerbread Keyboard btw, use it as my default now.
Be careful when you wipe cache or data using titanium backup. I accept no responsibility for any misuse that causes your phone to function incorrectly