The Arduino deals in voltages between 0 and +5V, the circuit you are trying to switch is -15V to 0V, so there is no overlap.
This won't work with a transistor unless perhaps you have Arduino gnd connected to -15V (in other words different ground references for the Arduino and keyboard).
But we don't know enough yet - you have measured the voltage at each side of the switch when its open, we need also to know the voltage its contacts are at when closed. If that voltage is -15V then an NPN transistor and Arduino ground at -15V would work. If 0V then a PNP transistor with Arduino +5V at keyboard ground would work.
You also need to measure the current between the switch contacts - hopefully this is nice and small (10mA or so) in which case using an opto-isolator would be both feasible and most sensible.
In general having two units with different ground voltages can lead to problems and the opto-isolator route avoids that completely - we also don't really need to know anything about the circuit being switched other than its polarity and how much current.