-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Adapt to mobile, backspace to hide the menu, generally mobile does not have esc key. #987
Open
jimmy54
wants to merge
4
commits into
rime:master
Choose a base branch
from
jimmy54:dev-hmos
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems not reasonable. Your frontend should have the ability to hide itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前端确实有功能隐藏,就是比较麻烦。得先判断switcher已经显示,再手动发送XK_Escape按键。在switcher.cc直接添加,我觉是得更好的办法。一,不破坏原本逻辑。二,对所有移动端友好。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得没道理。
退格键是删除的意思但是这里没有输入。
他跟取消的含义不同,有时候能达到同样的结果那是因为正好删掉了当前状态显示的内容。
编辑之外这两个键也可能代表不同操作,比如用退格键回退到流程的上一层界面,ESC键可能是取消整个流程。
switcher 我设想中要允许输入命令。退格键现在没用,可留待今后扩展。现在弄混,就被动了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,我理解的输入是用户要激活switcher需要向rime发送一个hotkey,然后Rime的向用户返回了结果,且结果是以candidate展现的,同时preedit也被修改了。这时再输入退格键,其实是用户取消了。
假如后续添加多层界面,用退格键做返回感觉也不冲突。
现在遇到问题是rime现在没有一个状态显示switcher已经激活。所以一般移动端的做法是。先读取一下hotkey-》监控用户是否输入hotkey-》switcher激活-》如果要取消的话就向rime发送esc键。上面的逻辑在没有配置esc的移动端都需要写一遍。正常移动端来讲都不会配置esc键。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个确实有必要。粗看了一下实现,貌似不太容易加。
没做过,不理解。
如果说前端能打开方案选单,那么关闭比打开还要简单吧。
还是说,用户得自己按快捷键打开方案选单?用户能按出打开方案选单的键,但是按不出 esc?
键盘是自己开发的吗,能加上 esc 键吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,用户一般是按快捷键来调出方案选单的。一般来说移动端的虚拟键盘都不会配置esc键的,因为esc键用处不大,还占地方。
如果能加一个状态标识那更好了。用户能根据当前状态做选择,且在虚拟键盘上有UI上的变化。比如当前是激活状态,那么虚拟键盘上的退格键就显示取消菜单。用户点击取消菜单按钮会向rime发送esc的键值。