Using shortcut keys - Amazon Q Developer

Using shortcut keys

While getting inline suggestions from Amazon Q, you can use keyboard shortcuts for common actions you take, such as initiating Amazon Q or accepting a recommendation.

Choose the integrated development environment (IDE) where you are developing code to see keyboard shortcuts for your IDE.

Toolkit for Visual Studio
Action Keyboard shortcut

Manually initiate Amazon Q

AWSToolkit.CodeWhisperer.GetSuggestion in the keybindings

MacOS: Option + C

Windows: Alt + C

Accept a recommendation

Tab

Next recommendation

Edit.NextSuggestion in the keybindings

MacOS: Option + .

Windows: Alt + .

Previous recommendation

Edit.PreviousSuggestion in the keybindings

MacOS: Option + ,

Windows: Alt + ,

Reject a recommendation

ESC, backspace, or keep typing and the recommendation will disappear as soon as there is a character mismatch.

See also Microsoft's Visual Studio default keyboard shortcuts.

To change keybindings in Visual Studio, use Tools -> Options -> Keyboard.

AWS Toolkit for Visual Studio Code
Action Keyboard shortcut

Manually initiate Amazon Q

MacOS: Option + C

Windows: Alt + C

Accept a recommendation

Tab

Next recommendation

Right arrow

Previous recommendation

Left arrow

Reject a recommendation

ESC, backspace, or keep typing and the recommendation will disappear as soon as there is a character mismatch.

Accept next word

Option + right arrow

To change keybindings in VS Code, see Key Bindings for Visual Studio Code on the VS Code website.

Note

The inline suggestions toolbar in VS Code is disabled by default. For more information, see Redesigned inline suggestions toolbar on the VS Code website.

AWS Toolkit for JetBrains
Action Keyboard shortcut

Manually initiate Amazon Q

MacOS: Option + C

Windows: Alt + C

Accept a recommendation

Tab

Next recommendation

Right arrow

Previous recommendation

Left arrow

Reject a recommendation

ESC, backspace, or keep typing and the recommendation will disappear as soon as there is a character mismatch.

To change keybindings in IntelliJ, see IntelliJ IDEA keyboard shortcuts on the JetBrains website.

Amazon SageMaker
Action Keyboard shortcut

Manually initiate Amazon Q

MacOS: Option + C

Windows: Alt + C

Accept a recommendation

Tab

Next recommendation

Down arrow

Previous recommendation

Up arrow

Reject a recommendation

ESC

JupyterLab
Action Keyboard shortcut

Manually initiate Amazon Q

MacOS: Option + C

Windows: Alt + C

Accept a recommendation

Tab

Next recommendation

Down arrow

Previous recommendation

Up arrow

Reject a recommendation

ESC

AWS Glue Studio Notebook
Action Keyboard shortcut

Manually initiate Amazon Q

MacOS: Option + C

Windows: Alt + C

Accept a recommendation

Tab

Next recommendation

Down arrow

Previous recommendation

Up arrow

Reject a recommendation

ESC

Lambda
Action Keyboard shortcut

Manually fetch a code suggestion

MacOS: Option + C

Windows: Alt + C

Accept a suggestion

Tab

Reject a suggestion

ESC, Backspace, scroll in any direction, or keep typing and the recommendation automatically disappears.

To change the key bindings, use the following procedure.

  1. While viewing a particular function, choose the gear icon to open the Preferences tab.

  2. On the Preferences tab, select Keybindings.

  3. In the keybindings search box, enter Amazon Q.

AWS Cloud9
Action Keyboard shortcut

Manually fetch a code suggestion

MacOS: Option + C

Windows: Alt + C

Accept a suggestion

Tab

Reject a suggestion

ESC, Backspace, scroll in any direction, or keep typing and the recommendation automatically disappears.

  1. While viewing a particular environment, choose the gear icon to open the Preferences tab.

  2. On the Preferences tab, select Keybindings.

  3. In the keybindings search box, enter Amazon Q.

  4. In the Keystroke column, double-click the space corresponding to the function you're interested in.

  5. Enter the keys that you want to bind the function to.