Keyboard chip and HD firmware? I don't know what brand of the keyboard and HD device. For some firmware software writing methods, you need to remove the relevant chips from the motherboard and use a special writing device for writing. You only need to observe whether some chips with more pins or some ROM chips on the relevant motherboard have solder marks, for example Some residual traces of flux. Such chips are BIOS, ME, South Bridge, EC.
if your keyboard chip supports firmware software update through the operating system, please go to the relevant keyboard manufacturer's website to find relevant information or consult their technical support hotline for related questions.
Usually some professional hard disk repair tools, such as Russia's PC3000 software, can read the firmware of the hard disk to repair or rewrite it to repair the problem that the hard disk does not read and write the disk or the firmware is lost. But the premise is that the firmware backup must be saved, otherwise the hard disk will be scrapped. From a technical point of view, the hard disk firmware is encrypted and stored. The newer the hard disk, the higher the firmware version, the higher the security.
Now as far as I know, only real exploited firmware malware exists in BIOS firmware and hard disk ROM chip to write data to US NSA organization. I haven't heard it exist in the keyboard. If your keyboard and hard drive both support firmware update through the system, it is recommended that you flash the firmware again, but I need to remind you that all data in it should be backed up to prevent hardware damage due to any unexpected situations during the firmware flashing process.
Some files are malfunctioning due to missing firmware, so sometimes you need to refresh the firmware to see if the problem is solved. As a maintenance person, it is always a simple to complex process to repair things. For example, for a computer motherboard problem, first measure the voltage drop of all inductances on the motherboard to the ground diode to determine whether the electrical circuit is short-circuited. If there is no obvious short-circuit problem, try first. Refresh the BIOS and see, if there is still a problem, then check the CPU reset, whether the clock and other voltages exist, if so, check whether the working conditions of the South Bridge/EC are satisfied, and finally check the working conditions of the CPU. It will look simple, but the actual troubleshooting will be more complicated. But one thing is certain, that is to flash the BIOS firmware first.
Therefore, maintenance personnel will basically move the hardware firmware first. If you suspect that there may be a problem with the flashed firmware, then you should ask if you have gone to a more trusted repair shop for repairs. However, from a technical point of view, being able to obtain maliciously modified firmware for criminal purposes requires a high level of technology, I think.
Finally to answer your question, if the threat is known to Kaspersky, it should be able to be detected. Of course sometimes even known, but active, may not be detected, such as in current HD and BIOS firmware. The detection rate is not 100%.