Well, it's very simple. You can take out the hard drive from your system and use it as an external hard drive, copying all of your important data. After that, you can format it and install Windows on a new SSD.
Please follow the steps listed below to test the keyboard.
1. In Windows, search for an open HP PC Hardware Diagnostics for Windows, and then select "Run as administrator."
NOTE: If your computer doesn't have the HP PC Hardware Diagnostics for Windows app, you can get the latest version here...