Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save b1ghawk/60094aba422ebceb8faae65157d40e4a to your computer and use it in GitHub Desktop.
Save b1ghawk/60094aba422ebceb8faae65157d40e4a to your computer and use it in GitHub Desktop.
Resolving macOS Chinese Input Lag Issue
#!/bin/sh
# This script aims to address the problem of input lag that can occur when using the Chinese input method on macOS.
# It provides a simple and effective solution by terminating the SCIM process, which is often the cause of the lag.
# To use the script, follow these steps:
# 1. Open the Terminal application (located in "Applications/Utilities/Terminal").
# 2. Copy and paste the script into the Terminal window.
# 3. Press Enter to execute the script.
# Find the process ID of the process named SCIM
pid=$(pgrep SCIM)
if [ -z "$pid" ]; then
echo "Process named SCIM not found"
else
# Terminate the process
kill -9 "$pid"
# Check if the process was successfully terminated
if [ $? -eq 0 ]; then
echo "Successfully terminated the SCIM process"
else
echo "Failed to terminate the SCIM process"
fi
fi
echo "Completed"
@b1ghawk
Copy link
Author

b1ghawk commented Aug 23, 2023

111

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