This patch removes code that relies on the Carbon framework. Some deleted code explicitly mentions older versions of Mac (10.6) which are no longer supported (minimum 10.13). Some functions are shared between Cocoa and Carbon and can be imported from other Apple libraries.
I am not sure if there are edge cases for getButtons, but it seems like Cocoa handles the input elsewhere. There may be other areas which are not functionally valuable, but this patch is focused on eliminating importing `Carbon\Carbon.h` and the "GHOST Hack" workaround in `creator.c`.