Skip to content

聆风输入法: the boundary of user intent, and the Linux desktop details that need work

Chinese input on the Linux desktop is not short of usable options. IBus and Fcitx 5 are two parallel system entry points, and each can host pinyin, Rime, and other engines. Rime itself is a cross-platform C++ core, brought to Windows, macOS, and Linux through different frontends: Weasel, Squirrel, ibus-rime, and others. From outside, Windows input goes through TSF (Text Services Framework), macOS through InputMethodKit, and Linux through IBus or Fcitx 5. The three differ in framework boundaries, process models, and event semantics. The same input logic only holds on each platform after a large amount of adaptation work that matches that platform’s constraints.

聆风输入法 starts from a cross-platform semantic core runtime, and takes the everyday Linux desktop details that are easy to overlook seriously. What follows is the product boundary it is trying to keep, the engineering problems it is working on, and the stage it is in now.

User intent belongs to the user

An input method has to judge, on every keystroke, what the user is trying to type. Candidate order, long-sentence composition, correction, and frequency adjustment are all inferences about intent in the moment. Without that inference, an input method cannot work. The boundary for 聆风输入法 is not a denial of that fact. It is a limit on where and how long the inference lasts: it happens locally, inside the current input session. It is not persisted across sessions, it is not turned into a profile from input history, and the text is not converted into a data asset that can be accumulated. There is no sign-in, no account system, and no advertising or monetization in the way. Debug output and logs need to support being turned off and redacted. The data model does not reserve extra persistent fields “so we can know the user better.”

The cloud path needs its own explanation. 聆风输入法 stays neutral about models. A commercial model, a privately deployed model, a system model, or a local model can be an optional step in candidate generation. None of them is the default premise, and none is the only path. Model neutrality does not by itself guarantee a data boundary. Once text is sent to an outside service, the input method cannot control how that third party handles it by product design alone. The cloud path is therefore an optional capability the user turns on explicitly, not the default. The controls we expect are: local first by default; the cloud path can be turned off and can be recognized, and turning it on says what leaves the machine; prefer an API or private endpoint the user brings, so the server and the user have a direct agreement; the input method itself does not keep input text by way of the cloud path, and does not bind cloud results to an identity or a history. These are design targets. They have to be checked one by one when the feature is delivered. They are not a promise that the work is already done.

Details in the Linux input stack: scope and basis

Linux desktop input is the joint result of the compositor, the input framework, the toolkit, and the input protocol. The problems below are not unique to one project, but they sit on the path of frequent typing, so they are worth treating as engineering targets.

Case state falling out of sync with the keyboard indicator has been reported for some combinations of input framework and desktop session. It does not break every keystroke, but it breaks the rhythm when you move often among Chinese, English, and code. 聆风输入法 treats this as a basic engineering target because it is on the path of every key, not because it is a feature that can be shown on its own.

Candidate panels that follow the caret became a larger problem during the move to Wayland. Gaps among the compositor, the input framework, and the text-input protocol can leave the candidate window unstable or late, and GTK and non-GTK applications can behave differently. 聆风输入法 keeps calibrating its integration with GNOME, IBus, and Wayland, and treats panel placement as behavior that has to be checked again, not as a setting that stays fixed after one configuration.

How clean the input state is under GTK4 also needs real attention. People have already observed that some input methods work in GTK3, Qt, and similar environments, then hit exceptions in GTK4 applications around the input context or the preedit lifetime. GTK4 is a constraint on 聆风输入法 from the design of the semantic core: after the host application changes, focus moves, or preedit ends, input state should not be left behind in the editor. The point of the layered architecture is to handle edge cases and failures inside a layer we control, so they do not drag the host application down. A Fcitx 5 plugin runs inside the fcitx5 process, so an engine failure affects every application under that process, while an IBus engine running as its own process has a different isolation boundary. The layers in 聆风输入法 have to work inside that framework constraint. They do not replace the framework’s own process isolation.

Resident memory and predictable response time are a floor for usability. 聆风输入法 treats both as design constraints, not as performance numbers to optimize afterward. Concrete targets and how they are measured will be published with a build that can be run, and the result that counts is one that can be reproduced. For character coverage, the baseline is GB 18030-2022. The GB 18030 series has been a mandatory national standard since 2000, and the 2022 edition widened the character coverage. Two problems are often mixed together. One is a missing character: the lexicon or the encoding does not cover it, so it never appears as a candidate. The other is a tofu box: the character exists and can be committed, but the display has no glyph. The first is the input method’s coverage and encoding. The second, in most input methods, depends on the host application’s fonts. The input method cannot decide how an editor draws text that has already been committed.

聆风输入法 takes a different path for the second problem. The candidate panel is drawn by the input method, with its own font and render path, and does not depend on the host application’s font configuration. Rare characters and characters in extension planes can therefore be shown correctly inside the panel, instead of turning into boxes because the host font lacks a glyph. This covers the input method’s own presentation, from the candidate until the moment before commit. Visibility there is controlled by 聆风. How the character looks after it is committed is still decided by the host application’s fonts, which is outside the input method’s boundary. The two layers are separated so that “visible in the candidate panel” is not read as “visible in every application.”

On the lexicon, 聆风输入法 inherits the lexicon and language-model data that the Wanxiang pinyin scheme built from large-scale corpus training and long engineering work. Wanxiang’s grammar model was trained on about 32 GB of Chinese text across domains, including news, law, literature, and everyday language, and the lexicon was filtered with AI assistance and checked by hand. That accumulation is why 聆风 inherits it instead of building it from nothing: it has practical value for candidate accuracy and long-sentence input. Inheritance also raises license compatibility. Among the Wanxiang-related data, weights for some shared entries are published under CC BY 4.0, while the upstream lexicon itself may include data under other terms, including GPL-3.0. The whole collection cannot be assumed to be redistributable under one license. When 聆风输入法 integrates the data, each upstream term has to be handled on its own, and a distribution has to keep the corresponding source and license notices.

What this stage is aiming at, and how it will be checked

聆风输入法 is in development. It has not released a stable build that a general user can install. The target for this stage is one daily path: Ubuntu, GNOME, GTK4, and Wayland. Case state should stay consistent with the system indicator in ordinary use. The candidate panel’s following behavior should be predictable in GTK and non-GTK applications. Preedit should not be left behind after focus moves. Resident memory and response should stay stable inside a range that can be measured. The cloud path should be possible to turn off, and off by default. Input text should not enter a persistent profile.

Whether those targets hold is not judged from a design description or an architecture diagram. When the first runnable build is published, the test scenes, the measurement conditions, and the results will be published with it. If a target cannot be reached with reasonable resources under the current architecture, the target or the implementation changes. “The design is done” does not stand in for “it has been checked.” Capabilities that are not needed yet are postponed on purpose. Parts that already meet a reasonable bar stop being polished. Feature count and architecture complexity are not treated as progress.

Extending to NeoKylin, UnionTech, and other Xinchuang desktops comes after this path is stable and has been checked in real use. Those systems each have their own constraints in the desktop, the input framework, and system integration. Adaptation has to be checked item by item in the real environment. A promise is not a capability. Make one path solid, then consider extending. That is the more suitable order for an input method, which is a high-frequency basic tool.

Sustainability is handled under real conditions too. A long-term commitment is not an unlimited one. Pausing, changing direction, or not continuing a branch is part of engineering judgment. It does not cancel the work already done. Conscious choices inside constraints are how the project can keep existing in a maintainable state, rather than treating continuity as unbounded time and energy.

What 聆风输入法 wants to handle are the unremarkable parts of Linux desktop input that you pass through every day: state that matches, following that is predictable, nothing left behind, resources that stay under control, and intent that is not kept. If those hold in real use, this stage’s target is met. If they do not, the correction follows behavior that can be observed. It is not trying to finish an ideal system at the greatest cost. It is handling the details that are worth handling, by deliveries that can be checked and by a boundary that stays clear.