Please forgive me if it seemed that I was complaining. I was just trying to understand how your method worked.

If you're using a rotary encoder with detents as a control, detecting a single AB transition (out of four) between detents is probably preferable. That's how I do it but I use a switch state latch and simple parallel switch state logic to filter out the unwanted switch states.

Your method is simple and elegant. Thank you for sharing with us...

Cheerful regards, Mike