Thanks hamid3pnn. I'm still baffled by the problems with this port, but that did identify one issue.
Here are some more test builds, on box.com so I don't have to make a bunch of posts to get around the attachment limit:
1.4 tests with the old keyboard code:
firmware 101a
https://app.box.com/s/sralp1pb5d640i6h5p20xufjtskcwhzifirmware 102a
https://app.box.com/s/bfu3hp01cm1ckowbkyygrlt1uasdd7of1.3 test to enable the CHDK alt button in record mode, for 101a
https://app.box.com/s/l0y4e77ls4cw616apyag5gwpw0wq62agFor developersRegarding the touch button not showing in alt mode, stubs_min.S in both firmware versions has the following:
//To do: These were taken from ixus310
DEF(canon_play_menu_active, 0x0000e790) //ixus240 e790: 0 - 0x32aae0 <- this is always set when in rec and goes back to 0 on play mode
The comment suggests this is
always set in rec, making the behavior of never showing the alt button in rec mode the intended behavior. This seems undesirable to me.
ixus310 has a variable with the same name, but it's not clear if the behavior is the same.
The reason the button appears in shooting mode for firmware 102a is probably because the address is wrong on that port (I'm assuming 101a is "right" since that port was done first, and the discussion in
http://chdk.setepontos.com/index.php?topic=9005.msg102256#msg102256 refers to this firmware version).
In 101a, sub_FF2CC698 refers to E78C+4
In 102a, the equivalent appears to be sub_FF2CC6CC, which refers to 0xE794+4
Other variables from stubs_entry.S confirm that addresses in this range would not be the same for both firmware versions.
The corresponding code in ixus310 100a seems to be sub_FF2348F0, but it refers to a completely different variable (0xA1C8+4) from what that port calls canon_play_menu_active (0xe784)