Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hotkeys and make them more discoverable #1477

Open
6 tasks
taylorsperry opened this issue May 9, 2024 · 4 comments
Open
6 tasks

Update hotkeys and make them more discoverable #1477

taylorsperry opened this issue May 9, 2024 · 4 comments
Assignees

Comments

@taylorsperry
Copy link
Contributor

taylorsperry commented May 9, 2024

Command Windows / Linux MacOs
Chat
New Chat Alt + = Option + =
Open Chat Alt + - Option + -
Autocompletions
Generate an autocompletion Alt + \ option + \
Cycle through autocompletions Alt + ] or [ option + ] or [
Accept autocompletion tab tab
Commands
Explain Code Alt + Shift + 1 control + Shift + E
Smell Code Alt + Shift + 2 control + Shift + S
Generate Unit Test Alt + Shift + 3 control + Shift + T
Edit Code TODO control + Shift + Enter
Document Code TODO control + Shift + H
Code Lenses
Accept Control + Shift + = Command + Shift + =
Undo Control + Shift + Delete Control + Shift + Delete
Edit & Retry Control + Shift + Enter Control + Shift + Enter
Show Diff Command + Shift + ' Command + Shift + '

Hotkey discussion:

  • How can I find the existing hotkeys for Windows?
  • The hotkey for document doesn't seem to be implemented yet, and is there a reason it's x instead of d for "document"?
  • Should we/can we also replace the command keybinding with ctrl for executing document and accept/view diff? It feels clunky that there's a mix. Or should/can we use command for everything? Feedback from Julie: moving between ctrl for commands and command for completions is difficult to get used to. Has anyone else felt this? At least for me, it's easier to get my fingers to the command button than to the control button.
  • Feedback from Julie: for multi-line prompts, using the arrow up key to edit her prompt ends up moving her backwards in history. This seems like a pretty likely use case. Should we add support for something like shift + arrow up to edit the text box, or turn off the cycle-through-history functionality once a user has entered text?
  • Additional feedback from Julie: Keyboard shortcuts for accept/undo/edit/view diff are complex. Are ctrl + a (for accept), ctrl + u (for undo), and ctrl + d (diff) available, or is there another way we could simplify these shortcuts into just two keys?

Discoverability:

  • Whatever we land on for keybindings, we need to add them to the buttons and the context menu for better discoverability.

Image

Image

TODO:

@danielmarquespt
Copy link
Contributor

danielmarquespt commented May 10, 2024

How can I find the existing hotkeys for Windows?

We need to include them in the command tab. But they are part of the context menu

The hotkey for document doesn't seem to be implemented yet, and is there a reason it's x instead of d for "document"?

Me and @steveyegge where think of ctrl + shift + H for document. Because its easy to reach with two hands and its an open combination

Should we/can we also replace the command keybinding with ctrl for executing document and accept/view diff? It feels clunky that there's a mix. Or should/can we use command for everything?

Yes we should use CTRL for those options. Regarding why ctrl and not command: Command is taken for most combinations, and control is not :/

Feedback from Julie: for multi-line prompts, using the arrow up key to edit her prompt ends up moving her backwards in history. This seems like a pretty likely use case. Should we add support for something like shift + arrow up to edit the text box, or turn off the cycle-through-history functionality once a user has entered text?

This used to be a problem in the sidebar as well and its fixed, we just need to mimic the behaviour

Additional feedback from Julie: Keyboard shortcuts for accept/undo/edit/view diff are complex. Are ctrl + a (for accept), ctrl + u (for undo), and ctrl + d (diff) available, or is there another way we could simplify these shortcuts into just two keys?

I'll think about these

@taylorsperry
Copy link
Contributor Author

Some very brief testing suggests that command + z already works as an undo shortcut 🤔

@taylorsperry
Copy link
Contributor Author

@danielmarquespt I've gone into settings > keymaps > Cody and selected Eclipse (not the macOS option) and updated what I think are the existing keybindings for Windows. Is there a better way to check that from a Mac machine, or can you double-check me? And did you have any luck finding any simpler shortcuts?

I'd like to have a master list of Cody shortcuts on our docs page and also share with QA to make sure they're working correctly.

And @steveyegge do the Document and Edit shortcuts still need to be implemented for Windows?

@dominiccooney
Copy link
Contributor

Here's the keymap from a Windows machine with Cody, per the instructions @danielmarquespt sent on Slack:

keymap.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants