Reassign ALT button - General Help and Assistance on using CHDK stable releases - CHDK Forum  

Reassign ALT button

  • 7 Replies
  • 5181 Views
Reassign ALT button
« on: 02 / November / 2011, 02:05:28 »
Advertisements
Okay the Canon G10 has finally been ported and is working great!  I truly enjoyed participating as a BETA tester (my first experience) and really appreciate all the work by folks here.

My ultimate goal is to use CHDK to allow TTL in a underwater housing while in manual mode.  I have the TTL script working and ready to go, only one problem :(.  The housing has no control for the jog wheel.  The housing (non CHDK) work around allows the user to bypass the jog wheel by holding the "Print Button" while using the left or right buttons to make manual adjustments.  Unfortunately the "Print Button" is used by CHDK as <ALT>.

The CHDK user manual lists the following option (see below), but I do not think this is available for all cameras as it is not in my Misc Stuff menu.   

Any help would be much appreciated!!!  Thanks

<ALT> mode button Edit
 
Cameras with a shortcut button can assign from a number of buttons to use as the <ALT> button, choose from PRINT, SHORTCUT, FLASH, TIMER, ISO, or VIDEO buttons, the PRINT button is the default.
 Cameras that use the PRINT button as the default, but can assign another button as an alternative for use in waterproof enclosures etc > DISP. for A570, A590, A720, FACE for SX100, ISO button for A650. FE for G9

Re: Reassign ALT button
« Reply #1 on: 02 / November / 2011, 05:17:59 »
Should not be too hard to enable - the code is all there.  I'll take a look in the next couple of days and submit a patch.
 
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Reassign ALT button
« Reply #2 on: 02 / November / 2011, 09:14:54 »
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 ?

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Reassign ALT button
« Reply #3 on: 02 / November / 2011, 15:17:43 »
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

Code: [Select]
            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.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


Re: Reassign ALT button
« Reply #4 on: 02 / November / 2011, 21:22:44 »
I posted a patch file to add the adjustable ALT button option to the G10, G11 & G12.    I did the G10 and then remembered that there was a request a while back for this option on the G11.  And once I got started,  I just enabled it for the G12 too.  Not sure if that's a problem or why it wasn't available already (the change is trivial).   

I tested the G10.  The G11 is an identical change so should work.  I had to add one routine the G12 so it would be good to have this tested too.

If integrated into the main autobuild,  it will allow the DISP,  AE_LOCK or JUMP button to substitute for the PRINT button as the <ALT> enable key.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Reassign ALT button
« Reply #5 on: 03 / November / 2011, 19:04:08 »
Thanks Waterwingz and Philmoz for helping out with this issue.  If this is corrected you will make many underwater Canon users very happy. 

I am more than happy to do any testing necessary, but lack much skill beyond very simple scripts.

For a long time the Canon Series has been considered one of the most affordable underwater point and shoot options, while still having many of the DSLR attributes (excluding the shutter lag issue).  New underwater strobes have the ability to sync with camera TTL.  It is beyond me why TTL is by default not available in manual mode in Canon's own firmware.  It obviously can work in CHDK with a very simple script. 

Once working I believe the underwater photo community using point and shoot Canons would be thrilled  :xmas and this accomplishment is deserving of informing others about this great option.  Manual control is critical underwater where the camera often makes decisions as if it were on land.  In addition, getting a $800US+ strobe to work as the manufactures intended is also a big plus.

Great Canon Camera + affordable underwater housings + manual controls + TTL = a perfect world.  Well almost!!

PS>Waterwingz - good to converse with you on the forum again.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Reassign ALT button
« Reply #6 on: 03 / November / 2011, 21:13:25 »
Changes have been submitted to SVN.
The latest version from the autobuild server should have this.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Reassign ALT button
« Reply #7 on: 03 / November / 2011, 21:50:31 »
Great !!!!  That works !!!  Can't wait to rigorously try this out.

Thanks so much  :D


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal