TechxArtisanStudio / Openterface_MacOS

Openterface MacOS App source code
GNU Affero General Public License v3.0
17 stars 1 forks source link

The app should capture all key combinations, even if they are global key combinations #10

Closed SebastianOsinski closed 5 months ago

SebastianOsinski commented 5 months ago

Example: Host: macOS Target: macOS

When CMD+Tab is pressed on the host's keyboard, it should be passed to the target instead of switching applications on the host. This might come handy to implement it https://stackoverflow.com/a/58012972/1816253

ling3ye commented 5 months ago

Thank you very much for the information, it is a very challenging task to stop this system level shortcut response.

According to the information provided CGSSetGlobalHotKeyOperatingMode is a private Core Graphics Service (CGS) function and is not part of the public documentation or API, it is a private function used internally by macOS. This means that this function is not in the public framework and is not declared in any publicly available macOS development headers. Since it is a private API, developers using these functions may result in apps being rejected by Apple's App Store, and such code may be broken in future OS updates. So, we do not prioritise the use of this method.

I then tested using Quartz as well, but it seems that Quartz is a graphics and window management technology in macOS that is part of Core Graphics, which further encapsulates Core Graphics, Quartz Composer, Quartz 2D, Core Image, Core Video, PDFKit and QuickKit. Quartz further encapsulates Core Graphics, Quartz Composer, Quartz 2D, Core Image, Core Video, PDFKit, and QuickLook to provide drawing and animation capabilities. It handles 2D graphics rendering, text rendering, image manipulation and display, and PDF drawing on macOS systems, and there is no workaround for preventing system-level response events.

We will continue to keep an eye on this issue until a better solution is found.