

 AWS Cloud9 不再向新客户提供。 AWS Cloud9 的现有客户可以继续正常使用这项服务。[了解详情](https://aws.amazon.com/blogs/devops/how-to-migrate-from-aws-cloud9-to-aws-ide-toolkits-or-aws-cloudshell/)

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 适用于 IDE 的 macOS 默认按键绑定参考 AWS Cloud9
<a name="keybindings-default-apple-osx"></a>

此步骤说明如何选择 macOS 的 “默认按键绑定参考”。 AWS Cloud9

1. 在菜单栏上，依次选择 **AWS Cloud9** > **Preferences（首选项）**。

1. 在 **Preferences（首选项）**选项卡上，选择 **Keybindings（键绑定）**。

1. 对于 **Keyboard Mode（键盘模式）**，选择 **Default（默认）**。

1. 对于 **Operating System（操作系统）**，选择 **MacOS**。

有关键绑定的更多信息，请参阅[使用键绑定](settings-keybindings.md)。

以下是 AWS Cloud9 集成开发环境 (IDE) 中 macOS 操作系统的默认键盘模式键绑定列表：
+  [一般性问题](#keybindings-default-apple-osx-general) 
+  [选项卡](#keybindings-default-apple-osx-tabs) 
+  [面板](#keybindings-default-apple-osx-panels) 
+  [代码编辑器](#keybindings-default-apple-osx-code-editor) 
+  [emmet](#keybindings-default-apple-osx-emmet) 
+  [终端](#keybindings-default-apple-osx-terminal) 
+  [运行和调试](#keybindings-default-apple-osx-run-debug) 

## General
<a name="keybindings-default-apple-osx-general"></a>


****  

| 说明 | 键绑定 | 命令 | 
| --- | --- | --- | 
|  添加选定内容作为监视表达式  |   `Command-Shift-C`   |   `addwatchfromselection`   | 
|  删除剪贴板中的剪切选择  |   `Esc`   |   `clearcut`   | 
|  显示代码完成上下文菜单  |   `Control-Space` \$1 `Option-Space`   |   `complete`   | 
|  代码完成，然后覆盖  |   `Control-Shift-Space` \$1 `Option-Shift-Space`   |   `completeoverwrite`   | 
|  将选定内容复制到剪贴板中  |   `Command-C`   |   `copy`   | 
|  将选定内容剪切到剪贴板中  |   `Command-X`   |   `cut`   | 
|  展开代码（如果适用）  |   `Tab`   |   `expandSnippet`   | 
|  显示当前文档的查找和替换栏  |   `Command-F`   |   `find`   | 
|  选择当前文档中的所有查找匹配项  |   `Control-Option-G`   |   `findAll`   | 
|  转至当前文档中下一处与您最后输入的查询匹配的内容  |   `Command-G`   |   `findnext`   | 
|  转至当前文档中前一处与您最后输入的查询匹配的内容  |   `Command-Shift-G`   |   `findprevious`   | 
|  在编辑器内活动文件中显示对插入点符号的所有已知引用  |   `Shift-F3`   |   `findReferences`   | 
|  打开 **Environment（环境）**窗口，然后使文件列表处于活动状态  |   `Shift-Esc`   |   `focusTree`   | 
|  重新格式化所选代码 JavaScript   |   `Command-Shift-B`   |   `formatcode`   | 
|  显示 *go to line（转到行）*框  |   `Command-L`   |   `gotoline`   | 
|  如果显示查找和替换栏，则将其隐藏  |   `Esc`   |   `hidesearchreplace`   | 
|  转到光标所在位置变量或函数的定义  |   `F3`   |   `jumptodef`   | 
|  如果在 **AWS Resources（Amazon 资源）**窗口的**Lambda**的部分中选择了本地 Lambda 函数，则尝试将函数作为远程函数上传到 Lambda  |   `Command-Shift-U`   |   `lambdaUploadFunction`   | 
|  创建新文件  |   `Control-N`   |   `newfile`   | 
|  显示 **Preferences（首选项）**选项卡  |   `Command-,`   |   `openpreferences`   | 
|  打开 **Terminal（终端）**选项卡，然后切换到文件列表中的选定文件的父文件夹  |   `Command-Option-L`   |   `opentermhere`   | 
|  在光标所在位置粘贴当前剪贴板中的内容  |   `Command-V`   |   `paste`   | 
|  显示对修复错误的建议  |   `Command-F3`   |   `quickfix`   | 
|  重做上次操作  |   `Command-Shift-Z` \$1 `Command-Y`   |   `redo`   | 
|  刷新预览窗格  |   `Command-Enter`   |   `reloadpreview`   | 
|  开始重命名/重构选定内容  |   `Option-Command-R`   |   `renameVar`   | 
|  显示当前文档的查找和替换栏，光标位于*替换为* 表达式上  |   `Option-Command-F`   |   `replace`   | 
|  重新运行您的初始化脚本  |   `Command-Enter`   |   `rerunInitScript`   | 
|  重启环境  |   `Command-R`   |   `restartc9`   | 
|  将当前文件重置为上次保存的版本  |   `Control-Shift-Q`   |   `reverttosaved`   | 
|  将每个打开的文件重置为上次保存的版本  |   `Option-Shift-Q`   |   `reverttosavedall`   | 
|  将当前文件保存到磁盘  |   `Command-S`   |   `save`   | 
|  使用不同的文件名将当前文件保存到磁盘  |   `Command-Shift-S`   |   `saveas`   | 
|  显示多个文件的查找和替换栏  |   `Shift-Command-F`   |   `searchinfiles`   | 
|  显示 **Process List（进程列表）**对话框  |   `Command-Option-P`   |   `showprocesslist`   | 
|  撤消上次操作  |   `Command-Z`   |   `undo`   | 

## 选项卡
<a name="keybindings-default-apple-osx-tabs"></a>


****  

| 说明 | 键绑定 | 命令 | 
| --- | --- | --- | 
|  关闭当前窗格中所有打开的选项卡（当前选项卡除外）  |   `Option-Control-W`   |   `closeallbutme`   | 
|  关闭所有窗格中所有打开的选项卡  |   `Option-Shift-W`   |   `closealltabs`   | 
|  关闭当前窗格  |   `Command-Control-W`   |   `closepane`   | 
|  关闭当前选项卡  |   `Option-W`   |   `closetab`   | 
|  向下移一个窗格  |   `Control-Command-Down`   |   `gotopanedown`   | 
|  向左移一个窗格  |   `Control-Command-Left`   |   `gotopaneleft`   | 
|  向右移一个窗格  |   `Control-Command-Right`   |   `gotopaneright`   | 
|  向上移一个窗格  |   `Control-Command-Up`   |   `gottopaneup`   | 
|  向左移一个选项卡  |   `Command-[`   |   `gototableft`   | 
|  向右移一个选项卡  |   `Command-]`   |   `gototabright`   | 
|  将当前选项卡下移一个窗格，如果选项卡已在最底部，则在对应位置创建一个拆分选项卡  |   `Command-Option-Shift-Down`   |   `movetabdown`   | 
|  将当前选项卡左移一个窗格，如果选项卡已在最左侧，则在对应位置创建一个拆分选项卡  |   `Command-Option-Shift-Left`   |   `movetableft`   | 
|  将当前选项卡右移一个窗格，如果选项卡已在最右侧，则在对应位置创建一个拆分选项卡  |   `Command-Option-Shift-Right`   |   `movetabright`   | 
|  将当前选项卡上移一个窗格，如果选项卡已在最顶端，则在对应位置创建一个拆分选项卡  |   `Command-Option-Shift-Up`   |   `movetabup`   | 
|  转至下一窗格  |   `Option-Esc`   |   `nextpane`   | 
|  转至下一选项卡  |   `Option-Tab`   |   `nexttab`   | 
|  转至前一窗格  |   `Option-Shift-Esc`   |   `previouspane`   | 
|  转至前一选项卡  |   `Option-Shift-Tab`   |   `previoustab`   | 
|  返回上一选项卡  |   `Esc`   |   `refocusTab`   | 
|  再次打开上一选项卡  |   `Option-Shift-T`   |   `reopenLastTab`   | 
|  在文件树中显示当前选项卡  |   `Command-Shift-L`   |   `revealtab`   | 
|  转至第十个选项卡  |   `Command-0`   |   `tab0`   | 
|  转至第一个选项卡  |   `Command-1`   |   `tab1`   | 
|  转至第二个选项卡  |   `Command-2`   |   `tab2`   | 
|  转至第三个选项卡  |   `Command-3`   |   `tab3`   | 
|  转至第四个选项卡  |   `Command-4`   |   `tab4`   | 
|  转至第五个选项卡  |   `Command-5`   |   `tab5`   | 
|  转至第六个选项卡  |   `Command-6`   |   `tab6`   | 
|  转至第七个选项卡  |   `Command-7`   |   `tab7`   | 
|  转至第八个选项卡  |   `Command-8`   |   `tab8`   | 
|  转至第九个选项卡  |   `Command`   |   `tab9`   | 

## 面板
<a name="keybindings-default-apple-osx-panels"></a>


****  

| 说明 | 键绑定 | 命令 | 
| --- | --- | --- | 
|  显示 **Go to Anything（转到任意内容）**模式中的 **Go（转到）**窗口  |   `Command-E\|Command-P`   |   `gotoanything`   | 
|  显示 **Go to Command（转到命令）**模式中的 **Go（转到）**窗口  |   `Command-.\|F1`   |   `gotocommand`   | 
|  显示 **Go to File（转到文件）**模式中的 **Go（转到）**窗口。  |   `Command-O`   |   `gotofile`   | 
|  显示 **Go to Symbol（转到符号）**模式中的 **Go（转到）**窗口。  |   `Command-Shift-O`   |   `gotosymbol`   | 
|  显示 **Outline（大纲）**窗口  |   `Command-Shift-E`   |   `outline`   | 
|  显示隐藏的 **Console（控制台）**窗口，或隐藏显示的控制台窗口  |   `Control-Esc`   |   `toggleconsole`   | 
|  显示隐藏的 **Environment（环境）**窗口，或隐藏显示的环境窗口  |   `Command-U`   |   `toggletree`   | 

## 代码编辑器
<a name="keybindings-default-apple-osx-code-editor"></a>


****  

| 说明 | 键绑定 | 命令 | 
| --- | --- | --- | 
|  在当前光标上一行添加一个光标，如果已添加了光标，则在其上方再添加一个光标  |   `Control-Option-Up`   |   `addCursorAbove`   | 
|  在当前光标上一行添加第二个光标，如果已添加了第二个光标，将第二个光标向上移动一行  |   `Control-Option-Shift-Up`   |   `addCursorAboveSkipCurrent`   | 
|  在当前光标下一行添加一个光标，如果已添加了光标，则在其下方再添加一个光标  |   `Control-Option-Down`   |   `addCursorBelow`   | 
|  在当前光标下一行添加第二个光标，如果已添加了第二个光标，将第二个光标向下移动一行  |   `Control-Option-Shift-Down`   |   `addCursorBelowSkipCurrent`   | 
|  如果各行光标未对齐，则将各行上的所有光标移至与当前光标对齐的位置  |   `Control-Option-A`   |   `alignCursors`   | 
|  回退一个字符  |   `Control-Backspace \| Shift-Backspace \| Backspace`   |   `backspace`   | 
|  将选定内容缩进一个制表符位置  |   `Control-]`   |   `blockindent`   | 
|  将选定内容减少缩进一个制表符位置  |   `Control-[`   |   `blockoutdent`   | 
|  控制是否可以将光标从编辑器切换到 IDE 中其他位置  |   `Command-Z \| Command-Shift-Z \| Command-Y`   |   `cancelBrowserUndoInAce`   | 
|  将选定内容居中  |   `Control-L`   |   `centerselection`   | 
|  复制一行的内容，并将复制的内容粘贴到下一行  |   `Command-Option-Down`   |   `copylinesdown`   | 
|  复制一行的内容，并将复制的内容粘贴到上一行  |   `Command-Option-Up`   |   `copylinesup`   | 
|  删除一个字符  |   `Delete \| Control-Delete \| Shift-Delete`   |   `del`   | 
|  复制选定的内容，并在选择后立即粘贴复制的内容  |   `Command-Shift-D`   |   `duplicateSelection`   | 
|  将当前行的内容包含在选定内容中  |   `Command-Shift-L`   |   `expandtoline`   | 
|  将下一次出现的匹配符号之前的内容都选中  |   `Control-Shift-M`   |   `expandToMatching`   | 
|  折叠选定代码，如果选中的是折叠的单元，则将其展开  |   `Command-Option-L \| Command-F1`   |   `fold`   | 
|  折叠所有可折叠的元素  |   `Control-Command-Option-0`   |   `foldall`   | 
|  折叠所有可折叠的元素（当前选定内容范围除外）  |   `Command-Option-0`   |   `foldOther`   | 
|  向下移一行  |   `Down \| Control-N`   |   `golinedown`   | 
|  向上移一行  |   `Up \| Control-P`   |   `golineup`   | 
|  转至文件末尾  |   `Command-End \| Command-Down`   |   `gotoend`   | 
|  向左移一个字符  |   `Left \| Control-B`   |   `gotoleft`   | 
|  转至当前行末尾  |   `Command-Right \| End \| Control-E`   |   `gotolineend`   | 
|  转至当前行开头  |   `Command-Left \| Home \| Control-A`   |   `gotolinestart`   | 
|  转至下一错误  |   `F4`   |   `goToNextError`   | 
|  向下移一页  |   `Page Down \| Control-V`   |   `gotopagedown`   | 
|  向上移一页  |   `Page Up`   |   `gotopageup`   | 
|  转至前一错误  |   `Shift-F4`   |   `goToPreviousError`   | 
|  向右移一个字符  |   `Right \| Control-F`   |   `gotoright`   | 
|  转至文件开头  |   `Command-Home \| Command-Up`   |   `gotostart`   | 
|  向左移一个单词  |   `Option-Left`   |   `gotowordleft`   | 
|  向右移一个单词  |   `Option-Right`   |   `gotowordright`   | 
|  将选定内容缩进一个制表符位置  |   `Tab`   |   `indent`   | 
|  转至当前范围中的匹配符号  |   `Control-P`   |   `jumptomatching`   | 
|  增大字体大小  |   `Command-+ \| Command-=`   |   `largerfont`   | 
|  如果光标左侧是一个数字，则将其将减少 1  |   `Option-Shift-Down`   |   `modifyNumberDown`   | 
|  如果光标左侧是一个数字，则将其将增加 1  |   `Option-Shift-Up`   |   `modifyNumberUp`   | 
|  将选定内容向下移一行  |   `Option-Down`   |   `movelinesdown`   | 
|  将选定内容向上移一行  |   `Option-Up`   |   `movelinesup`   | 
|  将选定内容减少缩进一个制表符位置  |   `Shift-Tab`   |   `outdent`   | 
|  打开/关闭覆盖模式  |   `Insert`   |   `overwrite`   | 
|  向下移一页  |   `Option-Page Down`   |   `pagedown`   | 
|  向上移一页  |   `Option-Page Up`   |   `pageup`   | 
|  删除当前行  |   `Command-D`   |   `removeline`   | 
|  删除从光标到当前行末尾的内容  |   `Control-K`   |   `removetolineend`   | 
|  删除从当前行开头直至光标所在位置的内容  |   `Command-Backspace`   |   `removetolinestart`   | 
|  删除光标左侧的单词  |   `Option-Backspace \| Control-Option-Backspace`   |   `removewordleft`   | 
|  删除光标右侧的单词  |   `Option-Delete`   |   `removewordright`   | 
|  回放以前记录的击键  |   `Command-Shift-E`   |   `replaymacro`   | 
|  选择所有可选的内容  |   `Command-A`   |   `selectall`   | 
|  将下一行包含到选定内容中  |   `Shift-Down \| Control-Shift-N`   |   `selectdown`   | 
|  将左侧下一字符包含到选定内容中  |   `Shift-Left \| Control-Shift-B`   |   `selectleft`   | 
|  将当前行上光标之后的其余部分包含到选定内容中  |   `Shift-End`   |   `selectlineend`   | 
|  将当前行上从开头到光标的部分包含到选定内容中  |   `Shift-Home`   |   `selectlinestart`   | 
|  包含选定内容之后的更多匹配选择  |   `Control-Option-Right`   |   `selectMoreAfter`   | 
|  包含选定内容之前的更多匹配选择  |   `Control-Option-Left`   |   `selectMoreBefore`   | 
|  包含选定内容之后的下一个匹配选择  |   `Control-Option-Shift-Right`   |   `selectNextAfter`   | 
|  包含选定内容之前的下一个匹配选择  |   `Control-Option-Shift-Left`   |   `selectNextBefore`   | 
|  选择或查找下一个匹配选择  |   `Control-G`   |   `selectOrFindNext`   | 
|  选择或查找前一个匹配选择  |   `Control-Shift-G`   |   `selectOrFindPrevious`   | 
|  将从光标向下到当前页末尾的部分包含到选定内容中  |   `Shift-Page Down`   |   `selectpagedown`   | 
|  将从光标向上到当前页开头的部分包含到选定内容中  |   `Shift-Page Up`   |   `selectpageup`   | 
|  将光标右侧的下一字符包含到选定内容中  |   `Shift-Right`   |   `selectright`   | 
|  将从光标向下到当前文件末尾的部分包含到选定内容中  |   `Command-Shift-End \| Command-Shift-Down`   |   `selecttoend`   | 
|  将从光标到当前行末尾的部分包含到选定内容中  |   `Command-Shift-Right \| Shift-End \| Control-Shift-E`   |   `selecttolineend`   | 
|  将从当前行开头到光标部分包含到选定内容中  |   `Command-Shift-Left \| Control-Shift-A`   |   `selecttolinestart`   | 
|  包含从光标到当前范围中下一匹配符号的内容  |   `Control-Shift-P`   |   `selecttomatching`   | 
|  将从光标向上到当前文件开头的部分包含到选定内容中  |   `Command-Shift-Home \| Command-Shift-Up`   |   `selecttostart`   | 
|  将上一行包含到选定内容中  |   `Shift-Up \| Control-Shift-Up`   |   `selectup`   | 
|  将光标左侧下一单词包含到选定内容中  |   `Option-Shift-Left`   |   `selectwordleft`   | 
|  将光标右侧下一单词包含到选定内容中  |   `Option-Shift-Right`   |   `selectwordright`   | 
|  显示 **Preferences（首选项）**选项卡  |   `Command-,`   |   `showSettingsMenu`   | 
|  清除所有之前的选择  |   `Esc`   |   `singleSelection`   | 
|  减小字体大小  |   `Command--`   |   `smallerfont`   | 
|  如果已选择多行，则按排序顺序将其重新排列  |   `Command-Option-S`   |   `sortlines`   | 
|  在当前行末尾添加光标  |   `Control-Option-L`   |   `splitIntoLines`   | 
|  将光标所在位置内容移至行末尾，单独成行  |   `Control-O`   |   `splitline`   | 
|  在选定内容周围环绕块注释字符，如果已有块注释字符，则将其删除  |   `Command-Shift-/`   |   `toggleBlockComment`   | 
|  在选定的每一行开头添加行注释字符，如果已有行注释字符，则将其删除  |   `Command-/`   |   `togglecomment`   | 
|  折叠代码，如果已折叠，则取消折叠  |   `F2`   |   `toggleFoldWidget`   | 
|  折叠父代码，如果已折叠，则取消折叠  |   `Option-F2`   |   `toggleParentFoldWidget`   | 
|  开始击键记录，如果已在记录，则停止  |   `Command-Option-E`   |   `togglerecording`   | 
|  设置单词换行，如果已设置，则停止单词换行  |   `Control-W`   |   `toggleWordWrap`   | 
|  将选定内容更改为全部小写  |   `Control-Shift-U`   |   `tolowercase`   | 
|  将选定内容更改为全部大写  |   `Control-U`   |   `touppercase`   | 
|  转置选定内容  |   `Control-T`   |   `transposeletters`   | 
|  展开选定代码  |   `Command-Option-Shift-L \| Command-Shift-F1`   |   `unfold`   | 
|  展开整个文件的代码折叠  |   `Command-Option-Shift-0`   |   `unfoldall`   | 

## emmet
<a name="keybindings-default-apple-osx-emmet"></a>


****  

| 说明 | 键绑定 | 命令 | 
| --- | --- | --- | 
|  计算简单数学表达式（如 `2*4` 或 `10/2`）并输出结果  |   `Shift-Command-Y`   |   `emmet_evaluate_math_expression`   | 
|  将 CSS 等缩写扩展为 HTML、XML 或 CSS 代码，具体取决于当前文件的语法  |   `Control-Option-E`   |   `emmet_expand_abbreviation`   | 
|  使用制表键来遍历展开的 CSS 等缩写  |   `Tab`   |   `emmet_expand_abbreviation_with_tab`   | 
|  转至下一段可编辑代码  |   `Shift-Command-.`   |   `emmet_select_next_item`   | 
|  转至前一段可编辑代码  |   `Shift-Command-,`   |   `emmet_select_previous_item`   | 
|  展开一个缩写，然后将当前选定内容放入所生成片段的最后一个元素内  |   `Shift-Control-A`   |   `emmet_wrap_with_abbreviation`   | 

## Terminal
<a name="keybindings-default-apple-osx-terminal"></a>


****  

| 说明 | 键绑定 | 命令 | 
| --- | --- | --- | 
|  打开新的 **Terminal（终端）**选项卡  |   `Option-T`   |   `openterminal`   | 
|  在编辑器和 **Terminal（终端）**选项卡之间切换  |   `Option-S`   |   `switchterminal`   | 

## 运行和调试
<a name="keybindings-default-apple-osx-run-debug"></a>


****  

| 说明 | 键绑定 | 命令 | 
| --- | --- | --- | 
|  生成当前文件  |   `Command-B`   |   `build`   | 
|  恢复当前暂停的流程  |   `F8 \| Command-\`   |   `resume`   | 
|  运行或调试当前应用程序  |   `Option-F5`   |   `run`   | 
|  运行或调试上次运行的文件  |   `F5`   |   `runlast`   | 
|  单步进入堆栈中的下一个函数  |   `F11 \| Command-;`   |   `stepinto`   | 
|  单步退出当前函数的范围  |   `Shift-F11 \| Command-Shift-'`   |   `stepout`   | 
|  跳过堆栈中的当前表达式  |   `F10 \| Command-'`   |   `stepover`   | 
|  停止运行或调试当前应用程序  |   `Shift-F5`   |   `stop`   | 
|  停止生成当前文件  |   `Control-Shift-C`   |   `stopbuild`   | 