Long press is only possible to detect on some buttons - half-shutter, SET on some models (not all), direction keys (likely all models), zoom in/out (most models, but not all). The Play button is not among them.
A double-click should be easier to detect - that is, a single press could return to LiveView after a timeout, and a double press could trigger some special functionality.
A three-state toggle is also doable, e.g. LiveView --(PLAY)--> Image review --(PLAY)--> Image review with ML overlays --(PLAY)--> LiveView.
Though, it probably makes a lot more sense to hook the INFO/DISP key (normally used to toggle Canon review modes), and that would also be consistent with LiveView (press INFO until selecting the ML screen). Disadvantage: this particular key might require hardcoding yet another model-specific address, which I'd prefer to avoid. Reasons: I cannot test the image review mode in QEMU yet, to validate that address, and I'm no longer sure whether I can get tester feedback on all supported models. With fully generic code (without model-specific bits or assumptions), it's much easier to test - if it works on 2 or 3 cams, it will very likely work on all other models.
A double-click should be easier to detect - that is, a single press could return to LiveView after a timeout, and a double press could trigger some special functionality.
A three-state toggle is also doable, e.g. LiveView --(PLAY)--> Image review --(PLAY)--> Image review with ML overlays --(PLAY)--> LiveView.
Though, it probably makes a lot more sense to hook the INFO/DISP key (normally used to toggle Canon review modes), and that would also be consistent with LiveView (press INFO until selecting the ML screen). Disadvantage: this particular key might require hardcoding yet another model-specific address, which I'd prefer to avoid. Reasons: I cannot test the image review mode in QEMU yet, to validate that address, and I'm no longer sure whether I can get tester feedback on all supported models. With fully generic code (without model-specific bits or assumptions), it's much easier to test - if it works on 2 or 3 cams, it will very likely work on all other models.