Skip to content

Instantly share code, notes, and snippets.

@tseijp
Created April 30, 2024 06:01
Show Gist options
  • Select an option

  • Save tseijp/191d8f9edfb1c847573479202ed3316a to your computer and use it in GitHub Desktop.

Select an option

Save tseijp/191d8f9edfb1c847573479202ed3316a to your computer and use it in GitHub Desktop.
# Determine the keyboard setting in use
isWindowsKeySetting=true # Change this based on your setting
findPath="/System/Library/PrivateFrameworks/CoreJapaneseEngine.framework/Versions/A/Resources"
# Retrieve the paths for both KeySetting files
if $isWindowsKeySetting; then
KeySettingPath=$(find $findPath -name "KeySetting_Windows.plist")
else
KeySettingPath=$(find $findPath -name "KeySetting_Default.plist")
fi
# Copy the file to Desktop as a backup
cp "$KeySettingPath" ~/Desktop/
# Log the KeySettingPath: /System/Library/PrivateFrameworks/CoreJapaneseEngine.framework/Versions/A/Resources/KeySetting_Windows.plist
echo "KeySettingPath: $KeySettingPath"
# Open the file in vi for editing
sudo vi "$KeySettingPath"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment