This may be because the keyboard went into “sleep mode”.  To help conserve battery life, each Bluetooth keyboard is set to go into sleep mode after a short period of inactivity (approximately 10 min).  Once in sleep mode the first keystroke will be used to wake the keyboard up and any other keystroke after wards will be registered.