[VS Code & WebIDE] | Duo Chat keyboard shortcuts
This issue aims implement the following Duo Chat keyboard shortcuts for VS Code and WebIDE. Further details to how we decided on these shortcuts can be found in the parent epic.
Command | VSCode | General behavior | Special considerations for mac | Special considerations for Windows and Linux |
---|---|---|---|---|
br>Open/close chat |
Mac: option +d Linux + Windows: alt +d
|
When opening the chat, always switch to the chat text box. | On any text field on GitLab in the browser or in any of the IDEs and including the Chat text box itself do not print ∂ when user types alt +d .When users turn off keyboard shortcuts in GitLab or change the keyboard short cut in the IDE, let them produce ∂ with option +d . |
Override the browser, system, and IDE shortcuts if necessary. Consequences: - In Explorer, Chrome, and Firefox users cannot use alt +d to select the address bar. In Firefox and Chrome, they can use the alternatives F6 or Ctrl +L . In Edge, they can use the alternatives F4 or Ctrl +L .- On the German Windows, they cannot use alt +d to bring up the File Menu (Datei-Menu).-There could be other conflicts in other languages. When users turn off keyboard shortcuts in GitLab or change the keyboard short cut in the IDE, do not override browser, system, and IDE shortcuts for alt +d . |
br>Start new chat ( /reset ) |
option +n / alt +n in VS Code but this is not good due the important letter ~ for anything in GitLab and and also for coding. This means wherever we have implemented option +n we need to remove it again. |
- | ||
br>Explain, Refactor, Test - in IDEs only ( /explain ; /refactor ; /tests ) |
Mac: option +e ; option +r ; option +t Linux + Windows: alt +e ; alt +r ; alt +t
|
In GitLab in the browser do not implement these shortcuts. These are only for the IDEs. | Only apply these when something is selected. Else print € ; ® ; † . |
In VS Code, do not trigger refactoring when in search & replace as alt +r toggles regex. |
Send question (input in focus) |
Mac: return or cmd +return Linux + Windows: return or ctrl +return Note: return shall mean return or enter . |
Should only work when the chat is in focus, not globally, e.g. when in the editor; Hence it will still work when the keyboard shortcuts for GitLab in the browser are deactivated. | ||
New line while typing question |
shift +enter Note: return shall mean return or enter . |
Should only work when the chat is in focus, not globally, e.g. when in the editor; Hence it will still work when the keyboard shortcuts for GitLab in the browser are deactivated. | ||
Stop the creation of an answer |
Esc |
Should only work when the chat is in focus, not globally, e.g. when in the editor; Hence it will still work when the keyboard shortcuts for GitLab in the browser are deactivated. |
Edited by Torsten Linz