I was porting my app to MacOS terminal and found no mouse support (unlike Linux terminal). After some modification of the sources files I was able to turn the mouse support on. I'm not sure if it should be reported to the bugtracker or somewhere else.
In mouse.pp I found out the support was turned off by the instructions
{$if defined(aix) or defined(bsd) or defined(solaris)}
{$define NOMOUSE}
{$endif}
For me it looked that GPM was not supported in MacOS terminal but mouse terminal sequences was supported through the Keyboard unit. So I just changed the above define NOMOUSE to NOGPM (actually I used a bit different way not to recompile FPC units but the sense it the same):
And additionally I called InitMouse procedure disregarding the DetectMouse result (which is default behaviour in the Drivers unit where InitMouse is called only for non-zero ButtonCount = DetectMouse, but DetectMouse returns zero w/o GPM support).
These simple changes turned mouse macOS terminal support on through the use of Keyboard unit which processes mouse special sequences.
Can someone answer if there is any reason for no mouse support on macOS terminal by default? Should this be reported as a bug or improvement request? Should also this way be used to remove the GPM usage on Linux (as I read in gpm.pp file itself the gpm should be abolished ASAP)?