Using shoot_half for this is probably the best you can do, but monitoring a keypress is of course not very convenient for all scripts (impossible during md_detect_motion, inconvenient in scripts that mostly spend their time shooting). AFAIK you can't trap shoot, which is a good thing because it's the way to interrupt an unwanted/buggy/malfunctioning/erraneously started/whatever script that always works the same way. Of course the problem with half shoot is that it requires a delicate touch and you may full press by accident.
But I remember an old feature request (well, at least this has been discussed before) that -- for example -- the script interpreter should not immediately interrupt with the shoot key but instead jump to a shutdown function/subroutine/whatever if one has been defined in the script. A second shutter press could then interrupt a malfunctioning/slow shutdown routine.
Feel free to search the bugtracker for this request and add it there if not found... and naturally you're warmly invited to implement this (preferably for both lua and ubasic) if you're up to it...