feat(fcitx5): 润色期间按空格直接上屏粗识别文本 - #71
Open
zhanglongqi wants to merge 1 commit into
Open
zhanglongqi wants to merge 1 commit into
zhanglongqi wants to merge 1 commit into
Conversation
Pressing Space during Shift+F9 polishing now commits the rough ASR text and cancels the polish task. If the key arrives before the rough text (release grace window, transcription start, or first poll), the request is remembered and the text is committed as soon as it lands, instead of cancelling and leaking the key to the application. Space rather than Enter: a press that lands just after the polished result was committed only adds a space instead of submitting a message.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shift+F9 润色期间,如果粗识别文本已经满足需要,之前只能等润色完成,或者按键取消后粗识别文本也一并丢弃。本次在 Fcitx 5 中加入:润色期间按空格,取消润色任务并直接上屏粗识别文本,面板提示相应改为「粗识别文本(空格采用):」。
空格在粗识别结果到达之前按下时(松开快捷键后的短暂缓冲期、识别任务启动中、首次轮询前),不再取消润色并把按键漏给应用,而是记住请求,粗识别文本一到就上屏;润色失败或被取消时同样上屏粗识别文本。Esc 和其他按键的取消行为、普通 F9 的行为均不变。
选用空格而不是回车:如果按键稍晚、润色结果已经上屏,回车会作为换行传给应用,在聊天框或终端中等于直接发送;空格最多多出一个空格。这也与润色失败后后备结果可用空格采用的交互一致。
验证情况:
scripts/test/contracts.sh在跳过已知的「禁止 Python 源码」检查(与受版本控制的scripts/test/ibus-shift-integration.py冲突,见 fix(linux): 修复用户安装后缺少设置菜单入口及图标的问题 #70)后全部通过。