During the first two seconds after the keyboard gets power it calibrates the keys. If you are pressing a key during that the key detection will be off later on for sure.
It's recommended to only start typing after the LEDs went on. This only happens after a power loss, so there is no calibration for a normal restart.
In the case you pressed a key accidentally during the calibration phase a simple replug will fix it.