Skip to content

求助:fcitx5下,Ctrl+Space切换输入法之前会把已输入的字符提交为中文,有什么办法让其不提交为中文? #1822

Open
@catscarlet

Description

今天新安装的 Linux Mint 22.1,启用了 fcitx5-rime

现在输入一些字符后如果用 fcitx5 设置的 输入法切换 Ctrl+SpaceCtrl+Shift,已经输入的字符会提交并输出中文。
主要是这个场景基本都是发现应该输入英文的地方误打开了输入法。期望是能在切换输入法的时候,把已输入的英文留下(类似按回车),或者把已输入的内容都清空。

我试着改了配置文件,没有成功。添加 - { when: always, accept: Control+space, toggle: ascii_mode },结果是整个配置文件都不生效。

default.custom.yaml文件如下

patch:
    "menu/page_size": 9
    schema_list:
        - schema: luna_pinyin
    "switcher/hotkeys":  
        - "Control+grave"  
    "key_binder/bindings":
        - {accept: "KP_Enter", send: Return, when: composing}
        - {accept: minus, send: Page_Up, when: has_menu}
        - {accept: equal, send: Page_Down, when: has_menu}
        - { when: has_menu, accept: period, send: Page_Down } # .翻页
        - { when: has_menu, accept: comma, send: Page_Up } # ,翻页
    "ascii_composer/switch_key":    # ctrl&&shift 切换键效果
          Caps_Lock: clear            # 清屏幕
          Shift_L: commit_code        # 上档code
          Shift_R: commit_code        # 上档code
          Control_L: noop             # 不处理
          Control_R: noop             # 不处理

fcitx5配置文件如下

$ cat ~/.config/fcitx5/config 
[Hotkey]
# Enumerate when press trigger key repeatedly
EnumerateWithTriggerKeys=True
# Enumerate Input Method Backward
EnumerateBackwardKeys=
# Skip first input method while enumerating
EnumerateSkipFirst=False

[Hotkey/TriggerKeys]
0=Control+space
1=Zenkaku_Hankaku
2=Hangul

[Hotkey/AltTriggerKeys]
0=Shift_L

[Hotkey/EnumerateForwardKeys]
0=Control+Shift+Shift_L

[Hotkey/EnumerateGroupForwardKeys]
0=Super+space

[Hotkey/EnumerateGroupBackwardKeys]
0=Shift+Super+space

[Hotkey/ActivateKeys]
0=Hangul_Hanja

[Hotkey/DeactivateKeys]
0=Hangul_Romaja

[Hotkey/PrevPage]
0=Up

[Hotkey/NextPage]
0=Down

[Hotkey/PrevCandidate]
0=Shift+Tab

[Hotkey/NextCandidate]
0=Tab

[Hotkey/TogglePreedit]
0=Control+Alt+P

[Behavior]
# Active By Default
ActiveByDefault=False
# Share Input State
ShareInputState=No
# Show preedit in application
PreeditEnabledByDefault=True
# Show Input Method Information when switch input method
ShowInputMethodInformation=True
# Show Input Method Information when changing focus
showInputMethodInformationWhenFocusIn=False
# Show compact input method information
CompactInputMethodInformation=True
# Show first input method information
ShowFirstInputMethodInformation=True
# Default page size
DefaultPageSize=6
# Override Xkb Option
OverrideXkbOption=False
# Custom Xkb Option
CustomXkbOption=
# Force Enabled Addons
EnabledAddons=
# Force Disabled Addons
DisabledAddons=
# Preload input method to be used by default
PreloadInputMethod=True
# Allow input method in the password field
AllowInputMethodForPassword=False
# Show preedit text when typing password
ShowPreeditForPassword=False
# Interval of saving user data in minutes
AutoSavePeriod=30

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions