I've been having a frustrating issue with my keyboard lately. I'll notice a delay of 3-8 seconds where it either doesn't register my inputs or starts to multiply them. For instance, when I'm playing Minecraft, I'll press W and Space once, and then my character just continues to run forward and jump automatically for several seconds. This delay seemed to start about three months ago, and I'm not sure if it's the keyboard itself or if my computer is struggling with gaming. I also have trouble capturing this lag on video, as it often stops occurring when I try to record it.
3 Answers
Is your keyboard wireless? I used to experience similar issues when the batteries were low. It might be worth checking!
If restarting your computer seems to help, you could try using a PowerShell script that restarts the keyboard drivers. Here's a simple script you can run as admin that might save you from constantly restarting your PC:
```powershell
# Restart -Device by Class / Multiple Classes
$Class = "Keyboard", "HIDClass"
$Devices = Get-PnpDevice -PresentOnly -Class $Class
$Devices | Sort-Object 'FriendlyName' | % {
$PnPutil = "PnPutil.exe"
$RestartDevice = '/Restart-Device'
Write-Output "Restarting :: $($_.Name)"
& $PnPutil $RestartDevice, "$($_.'PNPDeviceID')" | Out-Null
If ( $LastExitCode -ne 0) {
Write-Warning "Restarting $($_.Name), Failed ( exit code $LastExitCode )"
}
}
```
Have you thought about trying a different keyboard? Swapping it out could help you determine if it's your current keyboard causing the problem.

It's not wireless, so that's not the issue.