[EDIT 3] I kind of "solved it" by at using the "strange" version. At least for the most important keys. It is suffient for my case, where I want to check
You can increment a counter for each keydown event, and decrement it for each keyup event. When the counter is zero, no keys are down.