fix: "/" 键默认输出改为半角斜杠,与 macOS 原生输入法一致 - #12
Open
chriscco wants to merge 1 commit into
Open
Conversation
punctuation.yaml 的 half_shape 里 '/' 映射为一个候选列表 [ 、, '/', /, ÷ ],列表首项是单次按键的默认输出,之前是顿号 、。 macOS 原生中文输入法按 "?/" 键(不按 Shift)默认输出的是半角 "/", 和英文输入法一致。把 '/' 调整到列表首位后,第一次按键输出半角 "/", 连续按仍可循环到 、/÷,不影响原有的顿号/全角斜杠/除号输入方式。
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.
需求 / 问题
macOS 原生中文输入法按键盘上的 "?/" 键(不按 Shift)时,输出的是半角斜杠 "/",和英文输入法完全一致。
但 TriFecta 目前按这个键默认输出的是顿号 "、",和用户在其他输入法/英文模式下的肌肉记忆不一致,输入代码、路径、URL 等场景里体验不友好。
根因
data/plum/punctuation.yaml中half_shape下 "/" 键映射为一个候选列表:Rime 的标点候选列表中,第一项是单次按键的默认输出,连续按同一个键会在列表内循环。这里列表首项是
、,所以默认按一下 "/" 输出的是顿号,需要再按一次才能出半角斜杠。修改
data/plum/punctuation.yaml:只是把
/调整到列表首位,使默认(单次按键)输出为半角 "/",与 macOS 原生输入法一致;顿号、全角斜杠、除号仍然可以通过连续按 "/" 循环选取,原有功能不受影响。