Come to think about it, even with the dimply-membrane type of keyboard, there are still keyswitches of some sort. Typically, pressing a key dimples the membrane and presses a conductive pad across a pair of electrical contacts. (Smooth and flat keyboards, that’s different.)
Ideally you would have the electrical schematic of the keyboard. You could solder two wires to the contacts (or their connecting traces) which are closed by the key you want to use, and run those outside the case to your other hardware.
You need to know just what the key contacts are connected to. Often one contact is “grounded” (connected to zero volts) and the other is “pulled high” (connected to a steady DC voltage of a few volts) through a resistor. The voltage at a point between the resistor and the contact will be high when the keyswitch is open, and low when it is closed. This difference is sensed by the rest of the keyboard circuitry and software, and translated into input characters.
If you only want to connect another keyswitch in parallel with the existing one (so that you can push the O key from two different locations, say), a simple external contact will do.
If you want the existing keyswitch to not only be a key input to the computer, but to also control some other hardware independently, you will need to provide some electrical isolation so that you other hardware does not affect the operation of the existing keyboard circuitry. A transistor or relay with a high-impedance input will do; it will react to the changing voltage from your keyswitch, without loading the keyboard, and use its own externally-supplied power to drive your other hardware.