Skip to content

Conversation

@tnhoang
Copy link

@tnhoang tnhoang commented Dec 19, 2025

Warning

This fix was written by Claude Code. It works on my mac. Use it with cautious

Summary

  • Enable OpenKey to run simultaneously for different macOS users (Fast User Switching support)
  • Change instance detection to only prevent duplicate instances per-user rather than system-wide
  • Allow multiple instances at system level by setting LSMultipleInstancesProhibited to false

Changes

Modifies the duplicate instance detection logic in both the main app (ModernKey/AppDelegate.m) and the helper app (OpenKeyHelper/AppDelegate.m) to check the UID of running processes using proc_pidinfo. Previously, the app would terminate if any instance of OpenKey was running on the system. Now it only terminates if another instance is running under the same user.

Files changed:

  • Sources/OpenKey/macOS/ModernKey/AppDelegate.m - Updated instance detection to check process UID
  • Sources/OpenKey/macOS/ModernKey/Info.plist - Set LSMultipleInstancesProhibited to false
  • Sources/OpenKey/macOS/OpenKeyHelper/AppDelegate.m - Updated instance detection to check process UID

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant