Is there any way to capture global key presses (even when my application isn't active) in Mac OS using Swift?
Thanks in advance.
Is there any way to capture global key presses (even when my application isn't active) in Mac OS using Swift?
Thanks in advance.
Yes, you can use NSEvent to add a global event monitor. Checkout this Swift 3 example here: https://stackoverflow.com/a/40509620/1791525