I've done it several times on both MIDI and non-MIDI keyboards. The thing you have to watch out for is that keyboards typically use a matrix to determine which key you've pressed. Imagine a checkerboard numbered 1 to 6 along one edge and a to z along the other. When you press the lowest key (call it C1) you connect 1 and a, C#1 is 2 and a, D1 is 3 and a ... on up to F1. F#1 is 1 and b, G is 2 and b ... and so on.
Normally each key has a diode between the switch and the numbered contact. You can wire the switches on the bass pedals up without the diodes as long as you don't try to play two notes that share the same number at the same time (i.e. C1 and F#1 or C1 and C2).
You're better to wire the pedals with the diodes but figuring out where to put them and what orientation can be awkward.
Keyboards that are velocity sensitive add a whole other set of problems since each key has two sets of contacts (IIRC), one N/C and one N/O. The brain of the keyboard times from when one contact opens to when the other closes to determine the velocity. Single switch pedals can be made to work with velocity sensitive keyboards (effectively giving maximum velocity each time you hit a pedal) but I can't remember how I did it. I think it involved more diodes on each switch on the pedals.
The simplest and cheapest way, if you just want to trigger single MIDI notes at a set velocity is to buy the cheapest non-velocity sensitive keyboard you can find (old portable home keyboards with small keys are usually cheap) and simply parallel the switch contacts on the keys to the corresponing contacts on the pedals. I've even made pedal boards using simple push button switches mounted on a piece of board.