Keys not working or groups of keys not working
The keyboard is a membrane type and can get dirty or fail as the plastic degrades leaving sections of keys not working.
The keyboard matrix is shown below - if groups are not working you can usually align this to one (or more) of the keyboard connectors K1-8 (Data) and K9-17 (Address) lines failing.
Remove the back plate screws from the keyboard and take out the rubber mat.
Clean the mat in warm soapy water, rinse well and allow to dry completely.
Wipe the membrane with a damp cloth if mucky but do not use any cleaners/alcohol as this may damage the plastic.
As mentioned above the membrane will be fragile after 30 years so take care.
If the memberane is broken or cracked then it may be possible to repair the damaged section with conductive paint but complete replacements are available from RWAP at https://www.sellmyretro.com/offer/details/new-sam-coupe-keyboard-membrane-2093
The keyboard connectors can end up being dirty, clogged with broken membrane or just bent so will usually need replacing.
You can test if the SAM is responding to keypresses by using a jumper wire between the K1-8 (Data) and K9-17 (Address) lines to activate the matrix - be careful not to short/bridge connections on the same connector.
If the connectors are broken they can be replaced, see Replacement Parts List.
Missing Keys and Key posts
If you are missing keys then Quazar may have some in stock.
Broken key posts can be 3D printed, see https://www.thingiverse.com/thing:2107545
Completely missing keyboard
Quazar sell a PS/2 Keyboard interface and also may have keyboards in stock.
Key removal and cleaning
Remove the back plate screws and make a note of how the plungers sit (a photo will help here) as there are some blank spaces with no posts and everything is going to drop out when the keys are removed.
If you forget this step then look at the rubber mat - the posts will match the rubber domes.
The larger keys will have metal support bars, these will need to be un-hooked from the keyboard base with fine pliers to push them out of the plastic lugs.
Remove the keys by pulling upwards gently with a key puller or prying with a plastic (not metal) 'spluger' and wash them and the keyboard base in hot soapy water before allowing to dry completely.
Details and schematics