They're the actual key-press sensors.
From what I recall [I'm not a pro repairer but I've had a lot of Yamahas in bits over the years, I used to work for them] it's mounted as one single strip. I wouldn't recommend a DIY approach.
It would be hard to tell without breaking into one [but don't, they're not repairable as such], exactly what has gone wrong. There should be two simple rings of 'carbon' inside, which contact with a similarly metallic/carbonised strip underneath. The dual circles time your keypresses to measure velocity. There's not a lot to go wrong with them, but I've known them fail over time [I've two at home; one is starting to fail after about 25 years]. They can get dirty, but that 'rubber' doesn't like being sprayed with contact cleaner, it will distort it, possibly permanently. There is a possibility the 'rubber' could harden & start to perish after some time, but I haven't yet had mine in bits to see if that is actually a possibility - I've been putting it off as long as I can ;)
Prompted by this - today I actually took one apart to show you how it works - & it turns out this one uses a different type of mechanism:\
95 screws - I counted - to get inside it this far. The circuit boards in the picture are pushed vertical & held up by Sellotape to keep them out of the way of the switch mechanism, and save me from disconnecting the 20 or so multiway plugs. The entire instrument is sitting upside down, so the keyboard is underneath this [you can just see the hinges/fulcra they rotate around. You go in from the bottom & of course the keys & mechanism are the last bits you get to after you've dug your way past everything else :\
On this keyboard, rather than the 'pimples' you have a flexible strip [lower red marker] which each key distorts to meet the set of contacts [top red marker]. The double strip is the timer for velocity. It measures how long from first to second contact.
I've now cleaned this up. Other than 25 years of dust, cobwebs & cigarette ash - remember the days people smoked in studios? - it doesn't look in bad condition at all.
I've yet to put it back together… I'll let you know how it goes…

Click for full size
Success! Fully-working keyboard again :)
I only put about 60 of the screws back, though - life's too short.