GitLab Duo Chat keyboard shortcuts in IDEs & in-product (iteration 2)
Context
We want to make it easy for our users to interact with GitLab Duo via keyboard shortcuts. The IDEs we're targeting do not seem to have much consistency in keyboard shortcuts. Nor do various extensions that have similar functionality to GitLab Duo. Therefore, we could invent something that is as logical as possible, so long as it does not conflict with the IDE system keyboard shortcuts.
User feedback that suggests that having keyboard short cuts:
Ask to have keyboard short cuts to (addressed?) | Feedback |
---|---|
open chat in browser ( |
A user quote motivating this work: "It’s [i.e. AI tools] not build in. I am using Intellij which is, I have the feeling, the worst IDE for the current plugins for AI tools. [...] I need to switch into the browser and then I need to take my mouse because if I work in my IDE I don’t need my mouse. So I need to switch my context completely. [...] I would really like to use GitLab Duo because so far it looked quite good. It worked pretty well in the IDE but unfortunately not with the language I am using right now.” |
open chat in browser ( |
Internal user feedback: It'd be great instead to have either a keyboard shortcut (e.g. d then c for Duo Chat?), or have it included as a command in the search bar, e.g. > Duo Chat
|
explain code/refactor/gen test in VS Code ( |
Internal user feedback: Add a keyboard shortcut for explaining the selected code, and generating tests. VS Code and the Web IDE are more efficient with shortcuts (i.e. ctrl shift G for creating a new commit). |
Existing keyboard shortcuts (IDEs, GitLab, OS)
Click to see existing keyboard shortcuts
OS keyboard shortcuts
VSCode
Visual Studio
Jetbrains
GitLab
Markdown tables:
Click to view IDE system keyboard shortcuts table (Windows)
Action | JetBrains IDEs | Visual Studio Code | Visual Studio | Neovim |
---|---|---|---|---|
Basic code completion | Ctrl+Space | Ctrl+Space | Ctrl+Space | |
Smart code completion | Ctrl+Shift+Space | Ctrl+Alt+Space | Ctrl+Alt+Space | |
Go to definition | Ctrl+Click | F12 | F12 | gd |
Find all references | Ctrl+Alt+F7 | Ctrl+Shift+F7 | Ctrl+Shift+F7 | gref |
Rename symbol | Shift+F6 | F2 | F2 | :rename |
Comment/uncomment | Ctrl+/ | Ctrl+K Ctrl+/ | Ctrl+/ Ctrl+- | gcc gc |
Move line up/down | Ctrl+Alt+Up Ctrl+Alt+Down | Alt+Up Alt+Down | Ctrl+Shift+Up Ctrl+Shift+Down | k j |
Duplicate line | Ctrl+D | Ctrl+Shift+D | Ctrl+D | . |
Reformat code | Ctrl+Alt+L | Ctrl+K Ctrl+F | Ctrl+K Ctrl+F | :retab |
Run/debug | Shift+F10 | F5 | F5 | r |
Stop debugging | Shift+F5 | Shift+F5 | Shift+F5 | q |
Open settings | Ctrl+Alt+S | Ctrl+, | Ctrl+, | :set |
Show quick documentation | Ctrl+Q | Ctrl+Shift+I | Ctrl+K I | K |
Toggle tool window | Ctrl+Alt+ | Ctrl+ | Ctrl+Alt+ | v |
Move cursor one character left/right/up/down | Ctrl+Left/Ctrl+Right/Ctrl+Up/Ctrl+Down | Alt+Left/Alt+Right/Alt+Up/Alt+Down | Left/Right/Up/Down | h/l/k/j |
Move cursor to beginning/end of line | Ctrl+Home/Ctrl+End | Home/End | Home/End | ^/\ \ |
Select next/previous word | Alt+Shift+Left/Alt+Shift+Right | `Ctrl+W`/`Ctrl+Shift+W` | `Alt+Shift+Left`/`Alt+Shift+Right` | `Ctrl+Shift+Left`/`Ctrl+Shift+Right` |
Select entire line | Ctrl+L | `Ctrl+L` | `Ctrl+L` | `Ctrl+L` |
Delete character before/after cursor | Backspace/Delete | Backspace/Delete | Backspace/Delete | x/d |
Delete word before/after cursor | Ctrl+Backspace/Ctrl+Delete | Alt+Backspace/Alt+Delete | Ctrl+Backspace/Ctrl+Delete | dw/dd |
Insert line above/below cursor | Ctrl+Enter | Shift+Enter | Ctrl+Enter | o/O |
Duplicate line | Ctrl+D | Ctrl+Shift+D | Ctrl+D | . |
Undo last operation | Ctrl+Z | Ctrl+Z | Ctrl+Z | u |
Redo last operation | Ctrl+Y | Ctrl+Shift+Z | Ctrl+Y | Ctrl+r |
Cut, copy, paste | Ctrl+X/Ctrl+C/Ctrl+V | Ctrl+X/Ctrl+C/Ctrl+V | Ctrl+X/Ctrl+C/Ctrl+V | x/y/p |
Find next/previous occurrence of text | F3/Shift+F3 | Ctrl+F/Ctrl+Shift+F | F3/Shift+F3 | n/N |
Replace text | Ctrl+H | Ctrl+H | Ctrl+H | :s |
Comment/uncomment line | Ctrl+/ | Ctrl+K Ctrl+/ | Ctrl+//Ctrl+- | gcc/gc |
Reformat code | Ctrl+Alt+L | Ctrl+K Ctrl+F | Ctrl+K Ctrl+F | :retab |
Go to definition | Ctrl+Click | F12 | F12 | gd |
Find all references | Ctrl+Alt+F7 | Ctrl+Shift+F7 | Ctrl+Shift+F7 | gref |
Rename symbol | Shift+F6 | F2 | F2 | :rename |
Click to view VSCode AI extensions keyboard shortcuts table (Mac)
action | system | vscode-chat-gpt | cody | genie | codiumAI | chatGPT GPT-4 | copilot | bito |
---|---|---|---|---|---|---|---|---|
refactor | control+shift+R | shift+command+R | ||||||
generate code | shift+command+A | |||||||
add tests | command+k shift+command+1 | control+command+C | ||||||
complete code | command+k shift+command+6 | |||||||
explain | command+k shift+command+4 | shift+option+E | ||||||
find bugs | command+k shift+command+2 | |||||||
optimize | shift+command+v | command+k shift+command+3 | ||||||
add comments | command+k shift+command+5 | shift+option+V | ||||||
accept inline suggestion | tab | |||||||
performance check | ||||||||
security check | shift+option+Z | |||||||
style check | shift+option+U | |||||||
accept next word of suggestion | command+right arrow | |||||||
next suggestion | option+] | option+] | ||||||
previous suggestion | option+[ | option+[ | ||||||
add documentation | shift+command+D | |||||||
open completions panel | control+enter | |||||||
accept panel suggestion | control+/ | |||||||
trigger inline suggestion | option+\ | |||||||
start a new conversation | control+shift+C |
| | | |
Suggested keyboard shortcuts (IDEs + GitLab)
Note: Neovim is currently being discussed in a separate issue as the conventions for neovim are quite different.
Linux + Windows
Command | JetBrains, VSCode, Visual Studio, GitLab |
---|---|
Open/close chat | Pending decision |
Send question (input in focus) |
return or ctrl +return
|
New line while typing question |
shift +enter
|
Mac
Command | JetBrains, VSCode, Visual Studio, GitLab |
---|---|
Open/close chat | Pending decision |
Send question (input in focus) |
return or cmd +return
|
New line while typing question |
shift +enter
|
Edited by Austin Regnery