feat: 添加页面内搜索快捷键 - #129
Open
MoYingJi wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
新增页面内搜索快捷键 /,统一聚焦各页面搜索框,并支持通过 Esc 让输入框失焦。
Changes:
- 注册页面内搜索动作及默认快捷键。
- 为七个页面标记可聚焦搜索框。
- 扩展输入框 Esc 行为及中英文文案。
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/core/hotkey/registry.ts |
注册搜索框聚焦逻辑 |
shared/defaults/hotkeys.ts |
添加默认 / 绑定 |
shared/types/hotkey.ts |
扩展动作 ID 类型 |
src/components/ui/SInput.vue |
Esc 时统一失焦 |
src/pages/Streaming/Songs.vue |
标记搜索框 |
src/pages/Liked.vue |
标记搜索框 |
src/pages/Library.vue |
标记搜索框 |
src/pages/History.vue |
标记搜索框 |
src/pages/Collection.vue |
标记搜索框 |
src/pages/Cloud.vue |
标记搜索框 |
src/pages/Artist.vue |
标记搜索框 |
src/i18n/locales/zh-CN.json |
添加中文动作名称 |
src/i18n/locales/en-US.json |
添加英文动作名称 |
MoYingJi
force-pushed
the
pr/feat/hotkey-focus-search-input
branch
from
August 1, 2026 21:47
6a3db09 to
08e2514
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
Suppressed comments (1)
shared/defaults/hotkeys.ts:139
- 必修:这个默认值并不能在所有键盘布局上表示“输入
/”。当前parseAccelerator/matchParsed按event.code和精确修饰键匹配,因此德语布局中的/(例如Shift+Digit7)不会命中无修饰键的Slash,用户按实际的/时功能无响应。请让该动作对可打印字符按event.key匹配,或改用跨布局稳定的默认组合键,并同步录入/展示逻辑。
defaultBinding: { inApp: "/", global: null },
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.
改动类型
是否包含破坏性变更
改动说明
增加了应用内快捷键「页面内搜索」,在有搜索框的页面(比如歌单页面)聚焦到搜索框。默认快捷键为
/。为了操作更流畅统一,输入框可以用 Esc 失焦测试情况
测试有效
自查清单
pnpm format,并确认pnpm typecheck、pnpm lint通过pnpm build:native验证;未手写native/*/index.d.tsdev分支提交