I think it will also need a new 'keyname' in core/script.c ... or should I just use erase since there is a little blue trashcan next to it? Or would that be a problem too since that may be assigned to 'raw toggle'.
Use KEY_ERASE - that's what the button does. Curiously, the platform_camera.h file for the S100 has
#undef CAM_HAS_ERASE_BUTTON
so I believe the shortcuts will not use that button anyway.
Cool. Thanks!
I got the compiler from the A2200 porting thread and everything compiled and the new image is working. The ring func/erase is not quite working though.
I used the stable build and I just added the one definition of erase to keymap in kbd.c as described above.
I ran a button test script from the wiki (
http://chdk.wikia.com/wiki/UBASIC/Scripts:_Button_test) and when I press the ring func button, the
output from the button test script does print erase, but the command that the camera maps to the rung func button also activates. I tried a couple functions... assigning ISO or white balance function to the button makes those functions activate and popup behind the OSD. If I assign screen off, the screen turns on... when I turn it back on, I see that the erase button was pushed twice, as expected.
What is interesting is that in the button test script none of the other buttons actually activate any features they would normally activate, for instance 'menu' and 'video'.
I also made a lua script that just does click "erase". It does not activate the screen sleep or any of the functions I map to the ring func button using the standard camera menus. Maybe it needs some sleeping in there?
I think something is missing... I'll keep looking. Anyone have any suggestions where to look?