Transistors may still be ok after 40 years though their leads may be oxidized and difficult to solder. Depends on how well sealed they are. Many integrated circuits (plastic bodies) will absorb moisture thru the plastic and the chip will corrode.

But power supply components like electrolytic capacitors will not. They have a chemical paste inside which dries up.

Things like switches (keyboards are an array of switches) and connectors that depend on mechanical contact may not be ok because the contact surfaces will have oxidized unless they were gold-plated.

Fans would have the lubrication issues mentioned previously.

(I still have the ham radio kit I soldered together in 1973 and the radio still works. But the electrolytics had to be replaced, the switches are a bit intermittent, and the carbon resistors had to be replaced because they'd absorbed moisture in storage and all changed value.)

Some electronics could be useable. But you still have the issue of obtaining power.

Unless the character is a total ham-radio geek nerd tinkerer, the electronics won't be of much value.