I think what you are getting at is a diode across the the coil contacts on the relay to prevent a voltage spoke back to the ps/2 port when the electromagnetic field collapses?
Transistors and ICs (chips) must be protected from the brief high voltage 'spike' produced when the relay coil is switched off. The diagram shows how a signal diode (eg 1N4148) is connected across the relay coil to provide this protection. Note that the diode is connected 'backwards' so that it will normally not conduct. Conduction only occurs when the relay coil is switched off, at this moment current tries to continue flowing through the coil and it is harmlessly diverted through the diode. Without the diode no current could flow and the coil would produce a damaging high voltage 'spike' in its attempt to keep the current flowing.