Hello syed badshah,
On an HP ProBook with an Intel Core i5 8th gen, the distinction between hardware and software failure on the keyboard can be narrowed down with a few precise checks. The most direct test is to connect an external USB keyboard. If that works consistently, the issue is isolated to the built-in keyboard hardware or its ribbon cable connection to the system board. If the external keyboard also fails intermittently, then you are dealing with a driver or OS-level fault.
From the software side, the keyboard driver is managed under Device Manager > Keyboards > Standard PS/2 Keyboard. If you see error codes such as Code 19 or Code 39, that indicates a driver corruption. In that case, uninstalling the device and rebooting forces Windows to reload the driver from C:\Windows\System32\drivers\i8042prt.sys. If the driver reload does not resolve it, check Windows Update history for recent cumulative updates that may have affected input devices. Rolling back the update can confirm whether it is software-related.
If the keyboard works in BIOS (pressing F10 at boot to enter HP BIOS setup), then the hardware is functional and the fault lies in Windows. If it does not respond even in BIOS, then the keyboard assembly or its connector is defective. On HP ProBooks, the keyboard is connected via a ZIF ribbon cable under the palm rest. A loose cable or oxidized contacts can cause complete failure. Reseating the cable is the first hardware step before replacing the keyboard.
To summarize: test in BIOS to separate hardware from OS, check Device Manager for driver errors, and validate with an external keyboard. If BIOS input fails, you are looking at a hardware replacement. If BIOS input works but Windows does not, it is a driver or OS corruption.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
Domic Vo.