TypeSwitch is a modern macOS application built with SwiftUI for automatically switching input methods across different applications. Leveraging the latest Swift features and native macOS capabilities, it provides a seamless and efficient experience for managing input method preferences.
- 🔄 Auto Switch: Automatically switch to preset input methods when changing applications
- 🔍 Quick Search: Support fuzzy search for applications
- 🎯 Precise Match: Set independent input method preferences for each application
- 🚀 Auto Start: Support automatic startup
- ⌨️ Keyboard Shortcuts:
⌘ + F
- Quick search applications⌘ + R
- Refresh application list⌘ + Q
- Quit application
- 🎯 Quick Switch: Support customizable shortcut for switching current application's default input method
- 🖥 macOS 13.0 or later
- 🔐 Accessibility permission for monitoring application switches
- ⌨️ Input method switching permission
# Add tap
brew tap ygsgdbd/tap
# Install application
brew install --cask typeswitch
- Download the latest version from Releases
- Drag the application to Applications folder
- Grant necessary system permissions on first launch
- After launching, the app icon appears in the menu bar
- Click the menu bar icon to open the main interface
- Find the application you want to configure in the list
- Select the default input method for the application
- The input method will automatically switch when you switch to that application
TypeSwitch takes user privacy and security seriously:
- 🏠 All data is stored locally, nothing is uploaded to the network
- 🚫 No user information or usage data is collected
- 📖 Source code is fully open source and welcome for review
- 🛡️ Uses Swift's built-in security features
- 🔐 Permission usage:
- Accessibility: Only used for detecting application switches
- Input method switching: Only used for switching input methods
- Auto-start: Only used for launching at startup
This project uses the following open source libraries:
- Defaults (9.0.0) - For persistent settings storage
- SwiftUIX (0.1.9) - Provides additional SwiftUI components
- SwifterSwift (7.0.0) - Swift native extensions
- KeyboardShortcuts (2.2.2) - Add user-customizable global keyboard shortcuts
Build tools:
- Tuist - For project generation and management
- Xcode 15.0+
- Swift 5.9+
- macOS 13.0+
- Tuist
-
Install Tuist
-
Clone repository
git clone https://github.com/ygsgdbd/TypeSwitch.git
cd TypeSwitch
- Generate Xcode project
tuist generate
- Open and build
open TypeSwitch.xcworkspace
This project uses GitHub Actions for automated building and releasing:
- Push a new version tag to trigger automatic build:
git tag v1.0.0
git push origin v1.0.0
-
GitHub Actions will automatically:
- Build the application
- Create DMG package
- Release new version
- Generate changelog
-
Build artifacts can be downloaded from Releases
TypeSwitch/
├── Project.swift # Tuist project configuration
├── Tuist/ # Tuist configuration files
├── Sources/ # Source code
│ ├── Models/ # Data models
│ ├── Views/ # SwiftUI views
│ ├── ViewModels/ # View models
│ └── Utils/ # Utility classes
└── Tests/ # Test files
Pull requests and issues are welcome. Before submitting a PR, please ensure:
- Code follows project style
- Necessary tests are added
- Documentation is updated
This project is licensed under the MIT License. See LICENSE file for details.
This project was inspired by and received help from:
- SwitchKey - An excellent input method switcher that provided valuable reference
- Swift and SwiftUI community
- All contributors and users who provided feedback