Switch out of an input method and back with a lone Shift (#14975)
* Switch out of an input method and back with a lone Shift Fcitx's alternate trigger only acts while an engine like Pinyin is or was active, so Shift + letter and plain Latin typing are unaffected. It needs Shift releases intact, which the both-Shifts Caps Lock option prevented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Follow XDG_CONFIG_HOME in the Shift migration and test it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
35a55fd236
commit
dc50bbe574
6 files changed
+89
-2
No files matched your search
@@ -0,0 +1,10 @@
|
||||
echo "Let a lone Shift switch out of an input method and back"
|
||||
|
||||
# An earlier migration wrote this list empty. Fill only that empty list: a
|
||||
# missing one already falls back to Fcitx's Shift_L, and a filled one is the
|
||||
# user's choice.
|
||||
config="${XDG_CONFIG_HOME:-$HOME/.config}/fcitx5/config"
|
||||
if [[ -f $config ]] && awk '/^\[Hotkey\/AltTriggerKeys\]$/ { in_list = 1; found = 1; next } /^\[/ { in_list = 0 } in_list && /=/ { filled = 1 } END { exit !(found && !filled) }' "$config"; then
|
||||
sed -i --follow-symlinks '/^\[Hotkey\/AltTriggerKeys\]$/a 0=Shift_L' "$config"
|
||||
busctl --user call org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1 ReloadConfig 2>/dev/null || true
|
||||
fi
|
||||
Reference in new issue
Block a user