What does the keyboard have anything to do with the wireless? Wireless Keyboards normally use bluetooth or similar tech to connect to the PC. Not over WiFi.
As for your WiFi issues. Check your wireless NIC drivers, check device manager to see if you even see the wireless NIC in there anymore. If not it could be the NIC went bad. You can purchase a wireless NIC for pretty cheap nowadays.