Can you access non-standard mouse buttons?

Specifically, most (non-apple) mouses allow you to click the side of the scroll wheel left or right. I’d like to use those in my game. Input.GetMouseButton(int) seems to only work with 0, 1 or 2. Similarly, gaming mouses that have more buttons. I know they can be mapped to keystrokes with external software, but it’d be nice to be able to handle it from within Unity.

I think you will need to reasearch for the spesific hardware you need input from. A manufacturer may have an SDK for their range of products. Like for Logitech Logitech Gaming SDK | Integration | Unity Asset Store (Free)

The tool mnetioned here might come in handy to get the name of the buttons: keyboard - Identify Special key keycode - Stack Overflow

I stumbled upon this – I think in theory you should be able to accomplish it using the method described here:

but instead of handling WM_TOUCH you handle WM_MOUSEHWHEEL. the basic idea is to create a c++ dll that captures the handle of the game window and can intercept messages. then unity can query that dll if the mouse wheel is side-clicked. (might also be able to do it in c#/.net). Sounds like the long way around the mountain for me, and would only work on windows (vista or newer). So probably not worth it if I have to figure out a similar thing for mac, linux, etc.