rime / rime/squirrel

请问如何设置打开某app始终切换到英文模式?

Open
#164 23 comments 21 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
6.4k
Forks
554
PR merge metrics
No merged PRs in 30d

Description

我看到Squirrel支持所谓静默模式,我理解应该是可以让我在打开某应用的时候始终是英文输入模式?

但目前的情况是:在用iterm的时候如果偶尔我切换到中文模式,比如open一个中文名pdf,这时切换到pdf阅读。等过一会再切换回iterm窗口的时候,发觉iterm依然是中文模式,并未自动切换成英文模式。

请问,能否设置为只要切换到iterm窗口,该窗口的输入界面始终是英文模式?

我目前的squirrel.custom.yaml里的相关配置如下:

patch:
  app_options/com.googlecode.iterm2:
    ascii_mode: true

update (2017-05-26):

看到之前已经有人提了类似的issue #136 ,从 @lotem 的意见看这应该算Squirrel的一个feature,即切换窗口后依然保持各应用之前的输入状态。

但是对terminal、vim、emacs、alfred、词典等主要由ascii字符输入或控制的应用来说,在激活它们的时候,默认是英文状态对用户应该会更省心,无需去记忆自己上一次的输入法状态是什么,这样更能最大化静默模式的作用。因为不是总是退出应用的话,打开该应用一般只有一次,而切换并激活该应用会非常频繁。

此外,主动切换窗口以个人经验来看本次录入已经告一段落,如果开启静默模式,下次切换回来,直觉上也应该静默为英文状态。

请问代码上应该patch哪部分能够支持这种激活应用始终静默的功能?谢谢。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how app_options/ascii_mode is handled when a macOS window becomes active, and compare the behavior discussed in issue #136. Trace the existing per-application input state and determine where an always-English-on-activation option would belong. Done means the configured iTerm application reliably returns to English mode whenever it is activated, with the existing behavior preserved for other applications.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, swift, yaml
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.