feat: 句中辅助码新增大写字母触发方式 (#620)
* feat(engine): add uppercase trigger for shuangpin mid-sentence helpcode With the uppercase trigger on, an uppercase letter right after a complete two-key syllable opens a mid-sentence helpcode block by itself, as if the backtick had been typed before it: ulpbXihfa is ulpb`xihfa, and a following uppercase letter is still the second code (ulpbXYih is ulpb`xYih). The raw input keeps the typed letters; the block rules live in contracts/mid_sentence_helpcode.h so TSF, Server and engine parse alike, including the semicolon final, which no longer counts uppercase blocks. The scheme now hands the parsed layout (source index and decorations) to the request, so selection advance and preedit no longer re-parse the raw input. Adds the MidSentenceHelpcodeUppercaseChanged worker opcode (31). * feat(windows): count uppercase helpcode blocks before backtick and semicolon With MidSentenceHelpcodeUppercaseChanged on, TSF uses the shared block rules when deciding whether '`' opens a block and whether ';' is the ing final, in both the synchronous and the deferred key classification. * feat(server): wire the mid-sentence helpcode uppercase trigger New helpcode.shuangpin_mid_sentence_helpcode_uppercase (default off) in both config templates, both settings hosts and the settings page as a third trigger checkbox. It takes effect only with mid-sentence helpcode on and direct helpcode off; the Server applies it to the semicolon final rule and broadcasts MidSentenceHelpcodeUppercaseChanged to TSF.
This commit is contained in:
1 parent
22fb1e2569
commit
5208753ce8
39 files changed
+538
-98
No files matched your search
@@ -96,9 +96,9 @@ void apply_spellings(QueryRequest &request, const std::string &typed, const std:
|
||||
request.syllable_helpcodes = std::move(helpcodes);
|
||||
request.enable_mid_sentence_helpcode = true;
|
||||
request.enable_shuangpin_helpcode = false;
|
||||
request.direct_helpcode = true;
|
||||
request.direct_helpcode_source_index = std::move(source_index);
|
||||
request.direct_helpcode_decorations = std::move(decorations);
|
||||
request.has_syllable_helpcode_layout = true;
|
||||
request.syllable_helpcode_source_index = std::move(source_index);
|
||||
request.syllable_helpcode_decorations = std::move(decorations);
|
||||
request.valid = !clean.empty();
|
||||
if (!request.valid)
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user