关于键盘快捷键
Typing ? on GitHub brings up a dialog box that lists the keyboard shortcuts available for that page. 您可以使用这些键盘快捷键对站点执行操作,而无需使用鼠标导航。
You can disable character key shortcuts, while still allowing shortcuts that use modifier keys, in your accessibility settings. For more information, see "Managing accessibility settings ."
下面是一些可用键盘快捷键的列表。
The GitHub Command Palette also gives you quick access to a wide range of actions, without the need to remember keyboard shortcuts. For more information, see "GitHub Command Palette ."
站点快捷键
键盘快捷键 描述 s 或 / 聚焦于搜索栏。 更多信息请参阅“关于在 GitHub 上搜索 ”。 g n 转到您的通知。 更多信息请参阅"关于通知 ”。 esc 当聚焦于用户、议题或拉取请求悬停卡时,关闭悬停卡并重新聚焦于悬停卡所在的元素
control k or command k | Opens the GitHub Command Palette. If you are editing Markdown text, open the command palette with Ctl alt k or ⌘ option k . For more information, see "GitHub Command Palette ."
仓库
键盘快捷键 描述 g c 转到 Code(代码) 选项卡 g i 转到 Issues(议题) 选项卡。 更多信息请参阅“关于议题 ”。 g p 转到 Pull requests(拉取请求) 选项卡。 For more information, see "About pull requests ." g a 转到 Actions(操作) 选项卡。 更多信息请参阅“关于 Actions ”。 g b 转到 Projects(项目) 选项卡。 更多信息请参阅“关于项目板 ”。 g w 转到 Wiki 选项卡。 更多信息请参阅“关于 wiki ”。 g g 转到 Discussions(讨论) 选项卡。 更多信息请参阅“关于讨论 ”。
源代码编辑
键盘快捷键 描述 . Opens a repository or pull request in the web-based editor. For more information, see "Web-based editor ." control b 或 command b 插入 Markdown 格式用于粗体文本 control i 或 command i 插入 Markdown 格式用于斜体文本 control k 或 command k Inserts Markdown formatting for creating a link control shift 7 or command shift 7 Inserts Markdown formatting for an ordered list control shift 8 or command shift 8 Inserts Markdown formatting for an unordered list control shift . or command shift. Inserts Markdown formatting for a quote e 在 Edit file(编辑文件) 选项卡中打开源代码文件 control f 或 command f 开始在文件编辑器中搜索 control g 或 command g 查找下一个 control shift g or command shift g 查找上一个 control shift f or command option f 替换 control shift r or command shift option f 全部替换 alt g 跳至行 control z 或 command z 撤消 control y 或 command y 重做 command shift p 在 Edit file(编辑文件) 与 Preview changes(预览更改) 选项卡之间切换 control s 或 command s 填写提交消息
有关更多键盘快捷键,请参阅 CodeMirror 文档 。
源代码浏览
键盘快捷键 描述 t 激活文件查找器 l 跳至代码中的某一行 w 切换到新分支或标记 y 将 URL 展开为其规范形式。 更多信息请参阅“获取文件的永久链接 ”。 i 显示或隐藏有关差异的评论。 更多信息请参阅“评论拉取请求的差异 ”。 a 在差异上显示或隐藏注释 b 打开追溯视图。 更多信息请参阅“跟踪文件中的更改 ”。
键盘快捷键 描述 control b 或 command b 插入 Markdown 格式用于粗体文本 control i 或 command i 插入斜体文本的 Markdown 格式 control e 或 command e 在行内插入代码或命令的 Markdown 格式 control k 或 command k 插入 Markdown 格式用于创建链接 control shift p 或 command shift p Toggles between the Write and Preview comment tabs control shift 7 or command shift 7 Inserts Markdown formatting for an ordered list control shift 8 or command shift 8 Inserts Markdown formatting for an unordered list control enter 提交评论 control . ,然后 control [已保存回复编号] 打开已保存回复菜单,然后使用已保存回复自动填写评论字段。 更多信息请参阅“关于已保存回复 ”。 control shift . or command shift. Inserts Markdown formatting for a quote control g 或 command g 插入建议。 更多信息请参阅“审查拉取请求中提议的更改 ”。
| r | 在您的回复中引用所选的文本。 更多信息请参阅“基本撰写和格式语法 ”。 |
议题和拉取请求列表
议题和拉取请求
键盘快捷键 描述 q 请求审查者。 更多信息请参阅“申请拉取请求审查 ”。 m 设置里程碑。 更多信息请参阅“将里程碑与议题及拉取请求关联 ”。 l 应用标签。 更多信息请参阅“应用标签到议题和拉取请求 ”。 a 设置受理人。 更多信息请参阅“分配议题和拉取请求到其他 GitHub 用户 ”。 cmd + shift + p 或 control + shift + p 在 Write(撰写) 和 Preview(预览) 选项卡之间切换 alt 并单击从任务列表创建议题时,按住 alt 并单击任务右上角的 ,在当前选项卡中打开新议题表单。 更多信息请参阅“关于任务列表 ”。 shift 并点击从任务列表创建议题时,按住 shift 并单击任务右上角的 ,在新选项卡中打开新议题表单。 更多信息请参阅“关于任务列表 ”。 command 或 control + shift 并点击从任务列表创建议题时,按住 command 或 control + shift 并单击任务右上角的 ,在新窗口中打开新议题表单。 更多信息请参阅“关于任务列表 ”。
拉取请求中的更改
键盘快捷键 描述 c 在拉取请求中打开提交列表 t 在拉取请求中打开已更改文件列表 j 将所选内容在列表中向下移动 k 将所选内容在列表中向上移动 cmd + shift + enter 添加一条有关拉取请求差异的评论 alt 并单击通过按下 alt 并单击 Show outdated(显示已过期) 或 Hide outdated(隐藏已过期) ,在折叠和展开拉取请求中所有过期的审查评论之间切换。 单击,然后按住 shift 并单击 单击一个行号,按住 shift ,然后单击另一行号,便可对拉取请求的多行发表评论。 更多信息请参阅“评论拉取请求 。”
项目板
移动列
键盘快捷键 描述 enter 或 space 开始移动聚焦的列 escape 取消正在进行的移动 enter 完成正在进行的移动 ← 或 h 向左移动列 command + ← 或 command + h 或 control + ← 或 control + h 将列移动到最左侧的位置 → 或 l 向右移动列 command + → 或 command + l 或 control + → 或 control + l 将列移动到最右侧的位置
移动卡片
键盘快捷键 描述 enter 或 space 开始移动聚焦的卡片 escape 取消正在进行的移动 enter 完成正在进行的移动 ↓ 或 j 向下移动卡片 command + ↓ 或 command + j 或 control + ↓ 或 control + j 将卡片移动到该列的底部 ↑ 或 k 向上移动卡片 command + ↑ 或 command + k 或 control + ↑ 或 control + k 将卡片移动到该列的顶部 ← 或 h 将卡片移动到左侧列的底部 shift + ← 或 shift + h 将卡片移动到左侧列的顶部 command + ← 或 command + h 或 control + ← 或 control + h 将卡片移动到最左侧列的底部 command + shift + ← 或 command + shift + h 或 control + shift + ← 或 control + shift + h 将卡片移动到最左侧列的顶部 → 将卡片移动到右侧列的底部 shift + → 或 shift + l 将卡片移动到右侧列的顶部 command + → 或 command + l 或 control + → 或 control + l 将卡片移动到最右侧列的底部 command + shift + → 或 command + shift + l 或 control + shift + → 或 control + shift + l 将卡片移动到最右侧列的底部
预览卡片
GitHub Actions
键盘快捷键 描述 command + space 或 control + space 在工作流程编辑器中,获取对工作流程文件的建议。 g f 转到工作流程文件 shift + t 或 T 切换日志中的时间戳 shift + f 或 F 切换全屏日志 esc 退出全屏日志
通知
键盘快捷键 描述 e 标记为完成 shift + u 标记为未读 shift + i 标记为已读 shift + m 取消订阅
网络图
键盘快捷键 描述 ← 或 h 向左滚动 → 或 l 向右滚动 ↑ 或 k 向上滚动 ↓ 或 j 向下滚动 shift + ← 或 shift + h 一直向左滚动 shift + → 或 shift + l 一直向右滚动 shift + ↑ 或 shift + k 一直向上滚动 shift + ↓ 或 shift + j 一直向下滚动