Files
vim-im-switch/diagnose-im.sh
2025-11-04 17:50:43 +08:00

42 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# 输入法诊断和设置脚本
echo "🔍 系统输入法诊断"
echo "=================="
echo ""
echo "1. 当前 fcitx-remote 状态:"
/usr/local/bin/fcitx-remote
echo ""
echo "2. 当前输入法名称:"
/usr/local/bin/fcitx-remote -n
echo ""
echo "3. 系统输入法设置:"
defaults read ~/Library/Preferences/com.apple.HIToolbox.plist AppleSelectedInputSources
echo ""
echo "4. 可用输入法:"
ls /System/Library/Input\ Methods/ | grep -E "(Chinese|Pinyin|SCIM|TCIM)"
echo ""
echo "🛠️ 建议解决方案:"
echo "1. 打开系统偏好设置 → 键盘 → 输入法"
echo "2. 点击 '+' 添加中文输入法(如:简体中文-拼音)"
echo "3. 确保启用了至少一个中文输入法"
echo "4. 重新运行插件测试"
echo ""
echo "🧪 测试手动切换(请注意观察实际输入法是否切换):"
echo "执行: fcitx-remote -c (切换到英文)"
/usr/local/bin/fcitx-remote -c
sleep 1
echo "结果: $(/usr/local/bin/fcitx-remote)"
echo ""
echo "执行: fcitx-remote -o (切换到中文)"
/usr/local/bin/fcitx-remote -o
sleep 1
echo "结果: $(/usr/local/bin/fcitx-remote)"