Magic Mouse and Back/Forward thumb buttons

Hi,

I’m new to c++ and programming generally, but I’m starting to make some good progress on my GUI app!

One thing I want to do is allow users to go between different screens using the back/forward buttons on some mice, alternatively using swipe functionality on the Magic Mouse.

With the Magic Mouse I suspect I can use MouseWheelDetails deltaX. Perhaps this would also work for mice with wheels that go left/right.

How would I enable this same functionality with back/forward buttons? And would this work the same on both Mac and Windows?

I searched through the forum and didn’t find my answer. Some of the posts I saw were also almost 10 years old, so I suspect things might have changed since then.

Thanks,