Four suggestions:
- activate the on-screen keyboard, and use your mouse to "click" on every character that you otherwise would enter on your keyboard;
- borrow a friend's USB keyboard, and see if its keys work correctly. If it does, then you need to replace the laptop's keyboard, if you can afford it (buying a replacement keyboard on Amazon or eBay, and paying a technician to remove the bad keyboard & install the new one);
- find a Thrift Store that may have a pre-owned USB keyboard for an affordable price. Take your laptop, and test the keyboard in the Store. Also, look for a wireless keyboard with the USB "dongle". Often, I see wireless keyboards that do NOT have that dongle. Avoid buying that keyboard.
- if your laptop supports Bluetooth, can you afford an external keyboard that supports Bluetooth protocol?