With a matrix keyboard hack, the microswitch is just completing the circuit of the matrix. So there really isn't a "ground" for the button. Just connect the GND terminal from the m'switch to one side of the matrix, and the NO terminal to the other so when you push the button, it produces the keystroke you mapped.