So I have this laptop that had Windows 7 original and I updated to Windows 10, so I got a digital key. Since 2 weeks ago my PC got infected and I formatted but I wasn't smart enough to see which Windows 10 version I had(Pro, Home,etc) and I directly formatted my PC to Windows 10 Pro after that it said that it couldn't activate Windows so I tried a random key on the internet (I didn't knew I had a digital key). I was searching I found about the digital keys. Now my questions is if I format it to the right Windows 10 version will it still have the digital key or did I lost her because I tried to change to a random one? Or is there a way to see all the keys on a PC so I can recover the right one and insert it on the right Windows Version?
Now my questions is if I format it to the right Windows 10 version will it still have the digital key or did I lost her because I tried to change to a random one?
Once you have installed the same version of Windows 10 you had installed which based on the information you provided appears to have been Windows 10 Home you won't have to do anything in order for it to automatically activate. Windows 10 automatically activates based on a digital entitlement, since your machine already has an digital entitlement for Windows 10, Windows 10 Home will automatically activated itself.
Additionally, when prompted to enter your product key, skip that step and/or enter the Windows 7 key located on the COA sticker on your device.
Or is there a way to see all the keys on a PC so I can recover the right one and insert it on the right Windows Version?
Any license key you would have retrieved before you decided to format your machine would have been a generic key which cannot be used to activate nor install Windows 10. So it would have served absolutely no purpose in retrieving that key.
The only tool that would have given you the Windows 7 license key would have been ShowKeyPlus but it is located on the sticker so you don't need a tool to determine it (you also don't need it to reinstall Windows 10).