Skip to content

Instantly share code, notes, and snippets.

@qzydustin
Last active October 22, 2023 14:29
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save qzydustin/9e107d1d7e918aedf168a672f5e73f9a to your computer and use it in GitHub Desktop.
Save qzydustin/9e107d1d7e918aedf168a672f5e73f9a 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment