V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ufo22940268
V2EX  ›  中州韻

你们是怎么在用 rime 的情况下切换中英文的?

  •  
  •   ufo22940268 · 352 天前 · 3236 次点击
    这是一个创建于 352 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我现在的情况是通过 mac 的输入法切换快捷键来切换英文输入法和 rime 。然后 rime 只用来输入中文。

    有没有一种可能 mac 下只保留一种 rime 输入法,并且仍然用Command + Space来切换中英文。我试过下面的配置没有成功

      key_binder/bindings:
        # Tab / Shift+Tab 切换光标至下 /上一个拼音
        - { when: composing, accept: Shift+Tab, send: Shift+Left }
        - { when: composing, accept: Tab, send: Shift+Right }
        # Tab / Shift+Tab 翻页
        # - { when: has_menu, accept: Shift+Tab, send: Page_Up }
        # - { when: has_menu, accept: Tab, send: Page_Down }
    
        # Option/Alt + ←/→ 切换光标至下 /上一个拼音
        - { when: composing, accept: Alt+Left, send: Shift+Left }
        - { when: composing, accept: Alt+Right, send: Shift+Right }
    
        # 翻页 , .
        - { when: paging, accept: comma, send: Page_Up }
        - { when: has_menu, accept: period, send: Page_Down }
    
        - { when: always, accept: Command+Space, toggle: ascii_mode }          # 切换中英
        - { when: always, accept: Control+Option+space, toggle: ascii_mode }          # 切换中英
        - { when: always, accept: Control+Shift+2, toggle: ascii_mode }          # 切换中英
    
    
    第 1 条附言  ·  351 天前

    我最后的解决方案

    因为担心删了ABC输入法会有副作用,然后尝试了几次之后确实在最新的macOS下没有成功删掉。所以我的解决方案如下

    1. 保留ABC输入法。平常使用的时候输入法一直保持rime。
    2. rime里面配置切换中英文的快捷键为Shift + Control + 2
    3. karabiner里面添加配置把Command + Space 映射成 Shift + Control + 2
    20 条回复    2023-09-06 15:37:20 +08:00
    meisen
        1
    meisen  
       352 天前   ❤️ 1
    删除 ABC 不就好了吗
    ufo22940268
        2
    ufo22940268  
    OP
       352 天前
    好像 abc 还删不掉
    abujj
        3
    abujj  
       352 天前   ❤️ 1
    @ufo22940268


    1. /Library/Preferences/com.apple.HIToolbox.plist ,

    删掉 AppleEnabledInputSources
    下有“ABC”字样的文件夹就行


    2. ~/Library/Preferences/

    com.apple.HIToolbox.plist

    把里面的 ABC 删光,

    然后重启
    ufo22940268
        4
    ufo22940268  
    OP
       352 天前
    按照前面两个大神的方法成功把 ABC 删了。现在唯一问题就是没法设置 Command + Space 为快捷键了。暂时用 Shift + Control + 1 来切换。再次谢谢前面两位大神
    pppanda
        5
    pppanda  
       352 天前
    我是用 CapsLock 切换中英,基本够用了
    [iDvel/rime-ice: Rime 配置:雾凇拼音]( https://github.com/iDvel/rime-ice)
    wxxxcxx
        6
    wxxxcxx  
       352 天前
    为什么要把 abc 删掉? Cmd+Space 原本就可以切换呀。我在所有的平台上都是把中文输入法切换中英的快捷键关掉,使用系统切换键盘的方式来切换中英文。
    ruooooooli
        7
    ruooooooli  
       352 天前
    我是怕删了 ABC 会出啥 bug ,就留下了 ABC 和 Rime ,Rime 只输入中文。

    然后通过 karabiner-elements 这个改键工具,将 Shift 单独按下设置为了切换输入法,和其他组合还是 Shift 。

    目前用起来感觉挺顺手的,你也可以尝试用下 karabiner-elements 看是否能满足你的需求,供参考。
    Volekingsg
        8
    Volekingsg  
       352 天前
    可以考虑禁止 Rime 切换到英文(记得应该是通过 custom 去掉 engine/processors 中的 ascii_composer ),然后 ⌘-Space 切换系统输入法,即中英
    zbinlin
        9
    zbinlin  
       352 天前
    右 shift 键切换中英文
    yk000123
        10
    yk000123  
       352 天前
    把系统的 Control + Space 快捷键禁用,然后 rime 配置里 key_binder/bindings 加上{ when: always, accept: Control+space, toggle: ascii_mode }就行了。

    可能需要注销再登录,因为我第一次这样改是不生效的,以为改法有问题,后面重启后就可以了。

    唯一的缺点是切换到英文模式时已经输入的字母不能自动上屏。
    Sonwi
        11
    Sonwi  
       352 天前
    @ufo22940268 试试重启一下电脑,看快捷键能不能生效
    dengshen
        12
    dengshen  
       352 天前 via iPhone
    rime 大小写键短按切输入法,长按切大小写
    WebKit
        13
    WebKit  
       352 天前 via Android
    rime 只输入中文,会有中文状态下输入的英文不能上屏的问题。
    SenLief
        14
    SenLief  
       351 天前 via iPhone
    我中英文用的都是 rime 了
    Vitta
        15
    Vitta  
       351 天前
    我就是这样,rime 只输入中文,英文用 abc ,搭配锤子自动切换输入法
    Marasati
        16
    Marasati  
       341 天前
    用 input source pro 自动切换输入法直接锁定输入法。
    ychen997
        17
    ychen997  
       339 天前
    之前是键盘左下角的🌐切换 ABC 和 Rime ,然后 Rime 是 Control 切换中英文,并且用 input source Pro 自动切换输入法。但是最近发现这样还是有一点不好,就是在 Rime 下输入英文我一般用 Enter (左 Control 的位置太阴间了,很少用),但是在 ChatGPT 网页端,Enter 直接发送了对话。昨天搞了半小时,用 Karabiner 把键盘右边的⌘以及⌥都改成了短按 escape ,长按左 Control 。现在非常舒服,input source Pro 自动管理不同应用 ABC 和 Rime 的切换,在少数情况 Rime 输入英文,只需要按右边的 Cmd 和 Option 即可。
    另外我 CleanShot X 的 OCR 也是⌃+T ,之前也很阴间,现在好多了。
    用到的 Karabiner 的 rule: https://ke-complex-modifications.pqrs.org/#change_command_r
    ychen997
        18
    ychen997  
       339 天前
    刚刚看了一下楼上的评论,还是改了一下,Rime 好像确实有上屏问题,所以禁用了 Rime 的切换英文(把 AppOption 里面的 rule 全部 comment ),然后把右边的 Shift 改成了 Option+Space (系统切换 ABC 和中英文的快捷键) rcmd 以及 options_r 仍旧是短按 escape ( Vim 受害者),长按 Control 。
    lin9us6
        19
    lin9us6  
       338 天前
    成功删除 ABC ,使用很省心,少一步操作简直像系统更新升级的感觉。👍🏻。 目前没发现不协调的情况。
    hqman
        20
    hqman  
       226 天前
    用了 OP 的方案 码字舒服多了。
    修改了~/.config/karabiner/karabiner.json
    ```json
    {
    "title": "Change command+space to shift+control+2",
    "rules": [
    {
    "description": "Change command+space to shift+control+2",
    "manipulators": [
    {
    "type": "basic",
    "from": {
    "key_code": "spacebar",
    "modifiers": {
    "mandatory": ["command"],
    "optional": ["any"]
    }
    },
    "to": [
    {
    "key_code": "2",
    "modifiers": ["shift", "control"]
    }
    ]
    }
    ]
    }
    ]
    }
    ```
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   940 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 20:05 · PVG 04:05 · LAX 13:05 · JFK 16:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.