The macOS build does not use header files.  It uses X11 header files
copied from some old version of X11 which are embedded in the distribution.
Some of the structs in those headers have already been extended to add platform-
specific fields.  So I don't think there is any problem with adding a field to
the Xevent struct for the mac port.

I will do some testing to verify how the modifier keys affect mouse button
events.  But I am pretty sure that they are independent.  I think that each
mouse button event simply records the state of each modifier key at the time
of the button press.  There are also seperate keypress events which are
generated when a modifier key is pressed or released.