Welcome aboard, Trinity14.
Are you asking about a keyboard hack? (Not recommended due to limitations in USB keyboards.

)
Sounds like the other possibility is that you are referring to a keyboard-type encoder 4-player setup like an
IPac4, several
KADEs in parallel, or a
Lono2.
For a 2-player setup, the most commonly used encoders are the IPac2, KADE, and
KeyWiz. (PS/2 connection)
All the encoders listed above can be customized to send whatever keystroke you want when the associated input is grounded by the button push.
Can you be a bit more specific on what you want to do?
i.e. Put a MAME computer in an old 4-player cab?
Scott