fingalo has this on his CHDK page:
Remote control 4 functions with one button
I made a small script for using my remote button.
With autostart on and the following script I get 4 functions (on the s3is)
I can use it with my cable remote or with my radio remote, just by timing the press of the button.
1. Short press turn camera on, extend the lens.
2. Short press will take a picture
3. A bit longer press will take a picture with flash (if flash is lifted)
4. Looong press (>4 seconds) will turn camera off.
Very simple but useful!
(Next step is to add a small microcomputer (or a timer circuit) in the remote to detect several buttons and generate the timing, then you would not have to use 'camera Morse' code.)
@title Remote button
if get_autostart then
sleep 2000
set_autostart 0
press "shoot_half"
sleep 500
release "shoot_half"
endif
do
do
a = get_usb_power
until a>0
if a<50 then
shoot
else
if a>400 then
shut_down
else
set_prop 16 2
shoot
set_prop 16 0
endif
endif
until is_key "set"
end
I don't know if different cameras have different get_usb_power functionality. (Can't test my A710, don't have an USB remote.)