fix: 修复 Android IME 可打印 ASCII 输入兼容性 - #81
Merged
Merged
Conversation
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.
背景
Android 系统软键盘可能通过两种路径提交字符:未知键的文本提交,以及带有可翻译键码的虚拟键事件。Linux 版 Sunshine 的 UTF-8 注入在部分应用中可能停留在
U+Unicode 组合状态;同时,KEYCODE_PLUS等虚拟键事件会绕过文本兼容路径,使+因缺少 Shift 而退化为=。修改内容
EXT-IME-ASCII-INPUT
U+0020至U+007E)映射为标准 US/QWERTY 键码及必要的 Shift 修饰位。@显示为U+、+输入为=,以及其他 Shift 符号可能丢失修饰位的问题。extensions.input包,不依赖软键盘按键栏或视频视口扩展。兼容性说明
! " # $ % & ( ) * + : < > ? @ ^ _ { | } ~,并处理大写A-Z。扩展边界
EXTENSION DEVELOPMENT [EXT-IME-ASCII-INPUT] [ADDED]。Game.java接入点使用成对的[MODIFIED] BEGIN/END标记。dev/extensions/EXT-IME-ASCII-INPUT.md独立登记扩展边界,便于单独审查和后续维护。验证
在 Ubuntu 26.04 开发容器中,从上游
master的干净分支执行:结果:
git diff --check通过。