I did something similar once, entirely in hardware, by soldering a normally-open foot pedal switch to the keyboard's controller chip.<p>In most keyboards, a keypress is registered during the connection of two conductive pads on two separate membranes, each of which contain a trace back to a controller chip. You can take a keyboard apart, look at where the Ctrl key is, then visually follow the traces back to their respective pins on the chip. Soldering a switch to those two pins will register with the keyboard <i>exactly</i> as if that key were pressed.