power button in kbd.c - General Discussion and Assistance - CHDK Forum

power button in kbd.c

  • 2 Replies
  • 2529 Views
*

Offline c10ud

  • ***
  • 245
power button in kbd.c
« on: 30 / March / 2014, 05:30:08 »
Advertisements
This patch adjusts S110's kbd so it doesn't interfere with shooting (ptp) when keeping the KEY_POWER phisically pressed.
Also removed KEY_PRINT entry since I see a number of ports deprecated it.
Added (adjusted per later comments) in trunk changeset 3404 release 3405

For the power problem, is removing KEY_POWER from the key map necessary? I may have misunderstood the problem, but I would expect that just removing it from the mask would be enough.

The reason I ask is that quite a few ports have KEY_POWER in the key map. We should be consistent about how this is handled.

I would say this key should NOT ever be in the key mask. Pressing the power button should shut down whether you are in alt mode or not. I don't think it needs to be in the keymap either, since there are other ways to shut down, but if there is a reason to have it, that's OK with me.
thank you reyalp, removing is probably not necessary but as you say, the power button should stay the power button (also, why would you need to use that?) so.. I think keeping it for reference (commented) is the best option

*

Offline srsa_4c

  • ******
  • 4451
Re: power button in kbd.c
« Reply #1 on: 30 / March / 2014, 09:00:34 »
I would say this key should NOT ever be in the key mask. Pressing the power button should shut down whether you are in alt mode or not. I don't think it needs to be in the keymap either, since there are other ways to shut down, but if there is a reason to have it, that's OK with me.
One reason could be this:
https://www.assembla.com/code/chdk/subversion/commit/2498
Due to lack of buttons, it can be optionally remapped in ALT mode (defaults to 'no remap') on those 2 cameras.

*

Offline reyalp

  • ******
  • 14126
Re: power button in kbd.c
« Reply #2 on: 30 / March / 2014, 14:42:59 »
One reason could be this:
https://www.assembla.com/code/chdk/subversion/commit/2498
Due to lack of buttons, it can be optionally remapped in ALT mode (defaults to 'no remap') on those 2 cameras.
Thanks, I'd forgot about that.

I think on many other ports KEY_POWER has just been put in the keymap because the sig finder finds it.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal