

 AWS Cloud9 不再提供給新客戶。 AWS Cloud9 的現有客戶可以繼續正常使用該服務。[進一步了解](https://aws.amazon.com/blogs/devops/how-to-migrate-from-aws-cloud9-to-aws-ide-toolkits-or-aws-cloudshell/)

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# IDE AWS Cloud9 的 MacOS 預設按鍵繫結關係參考
<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) 

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


****  

| Description | 按鍵繫結關係 | 命令 | 
| --- | --- | --- | 
| 將選取項目新增為監看運算式 |  `Command-Shift-C`  |  `addwatchfromselection`  | 
| 從剪貼簿移除剪下選取項目 |  `Esc`  |  `clearcut`  | 
| 顯示程式碼完成內容選單 |  `Control-Space` \| `Option-Space`  |  `complete`  | 
| 程式碼完成，然後覆寫 |  `Control-Shift-Space` \| `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`  | 
| 顯示*移至行*方塊 |  `Command-L`  |  `gotoline`  | 
| 隱藏尋找和取代列 (若其目前顯示) |  `Esc`  |  `hidesearchreplace`  | 
| 移至游標處的變數或函數定義 |  `F3`  |  `jumptodef`  | 
| 如果在**AWS 資源**視窗的 **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` \| `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>


****  

| Description | 按鍵繫結關係 | 命令 | 
| --- | --- | --- | 
| 關閉目前窗格中所有開啟的標籤，但目前的標籤除外 |  `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>


****  

| Description | 按鍵繫結關係 | 命令 | 
| --- | --- | --- | 
| 以 **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>


****  

| Description | 按鍵繫結關係 | 命令 | 
| --- | --- | --- | 
| 在作用中游標的上一行新增游標，若已新增游標，則在該游標的上一行新增另一個游標 |  `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>


****  

| Description | 按鍵繫結關係 | 命令 | 
| --- | --- | --- | 
| 評估單純的數學運算式 (例如 `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`  | 

## 終端機
<a name="keybindings-default-apple-osx-terminal"></a>


****  

| Description | 按鍵繫結關係 | 命令 | 
| --- | --- | --- | 
| 開啟新的 **Terminal** (終端機) 標籤 |  `Option-T`  |  `openterminal`  | 
| 在編輯器及 **Terminal** (終端機) 標籤之間切換 |  `Option-S`  |  `switchterminal`  | 

## 執行與偵錯
<a name="keybindings-default-apple-osx-run-debug"></a>


****  

| Description | 按鍵繫結關係 | 命令 | 
| --- | --- | --- | 
| 建置目前的檔案 |  `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`  | 