you could write a script that keeps the lens open for as long as you press the button or f.i. one press to start and one press to stop exposure
There is no CHDK functionality to stop an ongoing exposure, regardless of whether you use the remote.
If the Canon firmware has a "bulb" mode, you could control that with key presses (real or scripted, with or without remote), but AFAIK very few cams have that. Maybe just the EOS Ms?
You could also probably close the *shutter* before the exposure was over, but the Canon firmware would continue to run the normal sequence, integrating the sensor for the specified time.