feat(engine): 直接辅助码句中四码可用第二位辅码大写结束 (#630)

直接辅助码的四码在句中原来只能补 / 结束(uiab/),现在也可以把第二位辅码敲成大写(uiaB)。
设置页「直接辅助码句中四码标记」两个勾选框可多选、至少留一个,默认只勾 /。

- 引擎:拼写图新增 Aux2Upper(非缩写)。开着大写标记时大写字母只能当第二位辅码,
  走不通再退回不分大小写的旧规则,第一位辅码敲大写(uiAuiQ)照常可用。/ 的收键受勾选控制。
- 协议:DirectHelpcodeChanged 载荷改为 "0"/"1"/"2"(2 = 开着但 / 不是编码键),
  TSF 据此决定吃不吃 /。
- 配置:新增 helpcode.shuangpin_direct_helpcode_slash / _uppercase,同步写入出厂模板、
  工作配置和两个设置宿主的读写映射。
This commit is contained in:
Lu Fan(SonnyCalcr) authored and GitHub committed 2026-10-05 20:43:02 +08:00
1 parent 3c79876205
commit 53ee180ec3
29 files changed
+347 -45

No files matched your search

+14 -1
View File
@@ -409,9 +409,22 @@ void InputSession::set_direct_helpcode_enabled(bool enabled)
online_requests_.invalidate();
}
void InputSession::set_direct_helpcode_markers(bool slash, bool uppercase)
{
if (direct_helpcode_slash_marker_ == slash && direct_helpcode_uppercase_marker_ == uppercase)
{
return;
}
direct_helpcode_slash_marker_ = slash;
direct_helpcode_uppercase_marker_ = uppercase;
engine_.set_direct_helpcode_markers(slash, uppercase);
update_mixed_candidates();
online_requests_.invalidate();
}
bool InputSession::accepts_direct_helpcode_slash_at(std::size_t caret) const
{
if (!direct_helpcode_enabled_ || !is_shuangpin() || dedicated_english_mode_ ||
if (!direct_helpcode_enabled_ || !direct_helpcode_slash_marker_ || !is_shuangpin() || dedicated_english_mode_ ||
local_input_mode_ != LocalInputMode::None)
{
return false;