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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With