Inputs backlogged over 20hz
If certain inputs are sent at a rate over 20hz, they will backlog. In the code, Keybinding.wasPressed() function (yarn mapping) consumes only 1 input per tick.
To replicate: Set keyrepeat to a sufficiently high rate. Example, use command xset r rate 200 50 to set delay and rate to 200ms/50hz respectively on Linux. Hold down a hotbar slot key for a few seconds, then try switching to other hotbar slots. It will keep switching to the slot you pressed originally, despite no longer pressing it.