First of all the problem only occurs while using Linux. It never happens using windows (8 or 10).
When typing something the keyboard will sooner or later freeze and not accept any new input and spam the last button I pressed while it froze.
I had the Problem using Xubuntu 16.04. I figured I might just reinstall Linux and switch to Kubuntu 16.04, but the problem persists.
My fix is to unplug and reconnect the keyboard.
The problem occurs quit often and makes Linux pretty much unusable. I can't really code when my thought process gets interrupted by this bug. So far I wasn't able to find someone else with the same problem and neither did I find a solution.