Ok, after a lot of tests and reverse-engineering, I found out that the ability to assign custom actions to the Transport bars is already there! :S
One, has simply to add
Code:
ACTION_STOP= (custom ID)
ACTION_STOP_SHIFT= (custom ID)
ACTION_PLAY= (custom ID)
etc
to define the custom actions he/she wants for these buttons.
I added the ability to cycle between Write and Latch Preview modes when pressing the Write button, and between Touch and Latch modes when pressing the Touch one.
DLLs are here:
https://stash.reaper.fm/30975/reaper_csurf_fpxt32.dll
https://stash.reaper.fm/30990/reaper_csurf_fpxt64.dll
Oh, Reaper and all of you guys are so awesome!