benilla-re systems structs docs

s_mouseButtonIndex

global · core

Address
0x42dcf0 · 9 bytes, up to 0x42dcf8
Type
uint8_t[9]
Meaning
Holds the case index of 0x42dc00 for messages 0x204 to 0x20c: right 4, middle 2, X 8 or 0x10
Confidence
verified, proof one
Finding
core/input#buttons-and-capture

Finding: Buttons and capture in core: window input

The window procedure gives the buttons the bits left 1, middle 2, right 4, X1 8 and X2 0x10. It captures the mouse when the first button goes down and releases it when the last comes up. On the event side, EventSetMouseMode (0x420540) switches the mouse mode for a set of buttons, and only while all of them are held; that set is kept, and when a button-up leaves any of it released, the mode returns to absolute.

The derivation is in the doc.