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

feat: add additional keymap #283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Odonno
Copy link
Contributor

@Odonno Odonno commented May 19, 2024

Improve experience by adding vscode keymap.
At least for me, it make CTRL+K+C and CTRL+K+U works.

  • Add vscode-keymap plugin to add additional keymaps https://github.com/replit/codemirror-vscode-keymap
  • Disable mod+K hotkey confitionally (disabled when in-editor) to be able to use CTRL+K+C and CTRL+K+U. Search window still works outside the query editor
  • Added hasEditorFocus and setHasEditorFocus in the InterfaceStore

Note: there is a warning to set defaultKeymap: false. I did not make this change and still to work as-is. I am note sure if anything is broken.

@Odonno Odonno requested a review from macjuul as a code owner May 19, 2024 13:52
@macjuul
Copy link
Contributor

macjuul commented May 24, 2024

I'm absolutely up for adding additional shortcuts and adopting the vscode keymap, however I think it's important for cmd+K to remain working within editors (and everywhere else throughout the app), even if this means we have to drop or preferably remap certain shortcuts

@Odonno
Copy link
Contributor Author

Odonno commented May 26, 2024

I can understand the point. Better stick with consistency. But it just feels frustrating not to be able to use the common comment/uncomment key bindings, even more frustrating when it opens the command palette.

One idea could be to offer a remapping of key bindings. Kind of what video games offers. But that seems too much effort and code for such a feature.

Another idea that can be simple to do could be to disable command palette (via feature flag) so that we can enable the comment key bindings. It would be trading a feature for another. Not liking it much though.

@macjuul
Copy link
Contributor

macjuul commented May 27, 2024

I'm satisfied if we keep commenting on cmd + / so we can leave cmd + K accessible from editors

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

Successfully merging this pull request may close these issues.

2 participants