Update : here's another work around. If you press and hold the Print button, it reverts to its original functionality for that press (i.e. hold for more than 1 second). That might be all you need and its already implemented ?
That works for the action assigned to the Print button; but it doesn't allow you to do the wheel simulation thing.
In the Canon firmware the Print button action is triggered when the button is released, while the button is held down you can press the left and right buttons (next to Func/Set) to simulate turning the wheel. This is needed in the underwater housings that don't have access to the wheel.
In CHDK the other buttons are blocked while the Print button is held down, and as soon as the delay is passed it triggers the Canon action. So you are prevented from using the left/right buttons to simulate the wheel.
On the G12 the following change to code/kbd.c (@ line 188) fixes the problem so you can have all three functions (ALT, Canon Print action, and wheel simulation).
- quick press of Print = enter ALT mode
- long press of Print + left/right button = simulate wheel
- long press and release of Print = Canon Print action
if (key_pressed == CAM_EMUL_KEYPRESS_DELAY)
kbd_key_press(conf.alt_mode_button);
//else if (key_pressed == +CAM_EMUL_KEYPRESS_DELAY+CAM_EMUL_KEYPRESS_DURATION)
// kbd_key_release(conf.alt_mode_button);
//return 1;
return (key_pressed < CAM_EMUL_KEYPRESS_DELAY) ? 1 : 0;
} else if (kbd_get_pressed_key() == 0) {
I haven't done a lot of testing on this so it might have other side effects.
This also changes the CHDK behaviour - long press no longer triggers Canon Print action until the button is released, instead of immediately. It might be better to make this change conditional on the ALT button being the Print button and the camera having a wheel.
Phil.