Chosen Solution

both ctrl, shift and alt keys stop working without any warning. sometimes they work, but most times they do not. do i need to get a new keyboard or is there a fix.

Did the keyboard suffer a liquid spill? If not, a quick way to detect hardware issues would be to run HP PC Hardware Diagnostics suite, it should be already installed in your system, if not you can download it from here. Alternatively, another method that could prove useful in confirming you don’t have a faulty keyboard is booting from a live GNU-Linux distro (Ubuntu and the likes), just remember to set from the BIOS the removable device you’ll be using as the first in the boot order, and to choose “Try Ubuntu” option when prompted to on the boot screen and welcome window. If HP software didn’t report any faulty keys or the keyboard works fine from within the live OS, this problem is definitely software-related: start by testing the built-in keyboard while in Safe mode, this will rule out any driver issue. If the keyboard works, reboot, navigate to Device Manager > Uninstall device > Keyboards, select your device, restart computer. When you reboot, the most generic drivers for your keyboard will be installed automatically and the problem should be solved