Now buttons 12+ work (in theory, I have only 12 so can't test higher), and button release is no longer ambiguous.
For now, only 1003 mouse mode is supported, and function keys are not yet supported, but the mouse is much more reliable: no lost events.