Tools, languages, libraries and API's for development of a MacOS wide application
No, there is no public API for these events on macOS. The programming language does not matter.
Yes. Using the Accessibility frameworks. The programming language does not matter.
Swift is Apple's recommended development language for macOS. Discussions about Swift are better answered elsewhere.
See above.
Within your own application, yes this is possible. Sections of windows can be transparent. This is possible in Objective-C or Swift but not in AppleScript. See xScope as an example of display wide overlays.