In most recording software space bar is assigned for start/stop play-back. And when you are recording, you arm the tracks, and press record, and then play to begin recording (in Cubase you have to turn off SYNC on the transport bar to have it work this way).
I had an old USB keyboard, and a small switch, and wanted to try and hack the keyboard so I can connect the switch to work as my space bar.
Step 1: Tracing the Path
There is a grate instructable that explains this in greater detail, check it out https://www.instructables.com/id/Hacking-a-USB-Keyboard/
The only thing I had to do here was to find to which pin on the circuit board goes the conductive printing from the spot (used for space-bar) on the first sheet, and then find the corresponding pin by tracing the path on the other sheet. It is like a maze so be patient with it, mark it and be methodical.
Step 2: Soldering Wires to the Circuit-board
Step 3: The Switch and Housing
The type of switch I used you can find in small electronics, computer mouse etc. The switch you are using must be a ”push-to-make" switch a type of biased switch that makes connection when you push on it and brakes the connection when you let go.
I had one big robust switch, which was unpractical to install, and one smaller which is the actual switch that is doing the job.
The big switch is kind of a housing for the smaller one. The bigger switch has a spring in the upper part and a pin that is pushing down in to the lower part, where the connections were made. I screwed open the switch and pulled out the parts that were making the connections.Then Ive put the smaller more sensitive switch inside so that the pin is pushing down on it.
Next you need to have some kind of housing. At first I wanted to use Altoids tin to house the circuit board and the switch, but I found something better. I had saved the transmitter from my old wireless keyboard that has broken down and its housing was perfect size for this project. After taking it apart, I've put in the big switch in first. The hole for the connect button was the perfect size for it.
Next I soldered the wires from the circuit board to the small switch, then inserted the smaller switch in to the larger one and glued them together. I fitted in the circuit board, kept it in place with melted plastic with the glue-gun, Screwed the top and bottom of the housing in place, and used some glue so secure the USB cable, because it was smaller than the hole in the housing.
That's all there is to it.