Add back and forward mouse buttons
This PR adds support for back and forward mouse buttons.
I've tested it and confirmed that it works correctly on POSIX (X11/Wayland), Windows, and WebAssembly.
Regarding macOS, I wrote the implementation based on existing code and some research, but I haven't been able to test it. It would be great if someone could verify whether it works as expected.
As for Redox, it appears that the underlying library does not support these buttons. Therefore, there's nothing that can be done at the moment. I've added match arms for completeness and used the unimplemented! macro to handle those cases.
This should work for now. The only thing I can't figure out is why it doesn't work in Firefox at all. Even in plain JavaScript, it doesn't seem to work, so it looks like the issue is specific to Firefox.
Also, to support capturing all buttons at the same time, I’ll work on replacing MouseEvent.button with MouseEvent.buttons.
Thanks!
I’ll work on replacing MouseEvent.button with MouseEvent.buttons
Do you want to do this in this PR or do you want to do it in a separate PR?
I think it's not related to the current PR, so it would be logical to include it in another PR. But as you wish.
I'm totally fine with having it in a separate PR :)
Just making sure: Are you happy with this PR so I can merge it now?
I tested it on all platforms except macOS. I don't have access to a Mac to verify it. Other than that everything else works fine.
I can test it on macOS first (I will do it after work today and get back to you)
Any updates on this?
Oh shit! I totally forgot about this! I will get it sorted tomorrow
I have tested now and it works just fine! Thank again.