I've experienced an identical symptom occasionally (multiple "d" character generation). It only appears on my Desktop PC after being awakened from Sleep mode.
The problem is infrequently* intermittent so I haven't invested in the time to seek out a permanent cure, but I suspect in my case, the problem may be due to a USB "wakeup" issue since I'm using a KVM Switch on my Desktop and Laptop PC's. I'm using a PS2 keyboard with a PS2/USB Adapter installed at the output of the KVM Switch.
The fix is simple for me and has worked every time so far. A Restart will clear up the problem but I tried something different the last couple of times that the problem appeared.
Instead of restarting the PC, I'll wait for a minute or two after wakeup from Sleep mode, and the problem will stop on its own.
What I'll do is open a Notepad window, and wait while the "d" characters self-generate for a minute or so, then the problem disappears and doesn't return until the next occurrence after a wakeup from Sleep mode.
* I looked at my excel file where I track my PC issues and I had 6 occurrences of this problem last year with no occurrences yet this year. I hasn't been worth it to dig deeply into the problem.