It does sound like something has gotten under the keys. If it's water or other liquid you run the risk of corrosion or fungus damage as the salts enable corrosion within the water and the sugars and solids in a drink can feed the fungus and mold which into eats the metal traces.
Crumbs and sand might be able to be pushed aside using some compressed air (can'd air - just be careful the liquid propellant doesn't enter)
In the meantime see if a Bluetooth or USB wired keyboard works, you may need use an external monitor to disable the internal keyboard from getting in the way with its miss typing.
+
+
Sadly, Apple doesn't make keyboard repairs inexpensive!make sure you've made a full backup onto an external drive, as you may want to get a temp/replacement system while you get yours fixed.
It does sound like something has gotten under the keys. If it's water or other liquid you run the risk of corrosion or fungus damage as the salts enable corrosion within the water and the sugars and solids in a drink can feed the fungus and mold which into eats the metal traces.
Crumbs and sand might be able to be pushed aside using some compressed air (can'd air - just be careful the liquid propellant doesn't enter)
In the meantime see if a Bluetooth or USB wired keyboard works, you may need use an external monitor to disable the internal keyboard from getting in the way with its miss typing.