My Moto g 4 has started ghost typing. I cleaned the screen, deleted recent downloads.
This is all I could find for you.
Strange ‘ghost’ typing? keyboard entry just goes wild…
Your experience is most likely a hardware issue, however, might also be a software glitch. The process for ruling out the latter follows:
Stop and test after each numbered step. If the issue is resolved after step 1, you’re done. If the problem resolves while in Safe Mode, you have a third party app creating a conflict. You’ll need to identify, then remove the offending app. If the issue survives step 3, this generally confirms a hardware issue.
Your Moto G4 has a one-year manufacturer’s warranty against defects. If you purchased your G4 from Republic, please raise a help ticket when signed into your Republic account here. If you purchased the G4 from a third party retailer, it would be time for a conversation with Motorola: Live Chat.