In macOS 10.15, we are creating an application (Swift) to capture text (TextFilet) keystrokes, but if you press the key that is registered in the shortcut key on the system, the shortcut functionality will work.
Is there any way to prevent shortcut function in the app?
[Example Shortcut Key]
·Shift+Cmd+4→Screen capture works
·Control+space→Input switching works
·Command+space→Spotlight works
When you press a shortcut, keyDown() is not also called, so you can't find a solution.
swift macos
Self-resolved.
By using CGEvent.tapCreate(), you were able to disable all input events on your keyboard.
© 2024 OneMinuteCode. All rights reserved.