I wanted to leave last comment on YT to chain regarding why you can't have multiple keypresses per frame, but jewgle won't let me post for some reason.
Anyway, I googled function name and bumped into https://github.com/nrootconauto/3Days#keyboard2 which is like the 256 byte array key state thing, but a bitmap.
That be all.