| | |
| | | if (g_activityToken != nil) return; |
| | | g_activityToken = [[NSProcessInfo processInfo] |
| | | beginActivityWithOptions:NSActivityUserInitiatedAllowingIdleSystemSleep |
| | | reason:@"PrivateVoice Input global hotkey listener"]; |
| | | reason:@"PrivateVoice Dictation global hotkey listener"]; |
| | | } |
| | | |
| | | static void* eventTapThreadMain(void* arg) { |
| | |
| | | C.beginHotkeyActivity() |
| | | trusted := C.ensureAccessibility() |
| | | if trusted == 0 { |
| | | logger.Info("Accessibility permission not granted for current app identity — hotkey won't work until PrivateVoice Input is removed and re-added in System Settings > Privacy & Security > Accessibility") |
| | | logger.Info("Accessibility permission not granted for current app identity — hotkey won't work until PrivateVoice Dictation is removed and re-added in System Settings > Privacy & Security > Accessibility") |
| | | } else { |
| | | logger.Info("Accessibility permission granted") |
| | | } |