Skip to content

Custom keybindings don't take effect until the keybindings.json file is saved on every page load #150

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

Closed
weikinhuang opened this issue Mar 8, 2019 · 4 comments

Comments

@weikinhuang
Copy link

  • code-server version: 1.31.1-100
  • OS Version: Windows 10 desktop, running on remote docker Ubuntu 18.04.1 LTS, downloading the release binary from the releases tab.

Steps to Reproduce

  1. Create a keyboard shortcut with a when=!isMac condition
    { "key": "ctrl+d",                "command": "editor.action.deleteLines",
                                         "when": "!isMac" },
  1. Try to use shortcut in the editor, it does nothing
@NGTmeaty
Copy link
Contributor

NGTmeaty commented Mar 8, 2019

Are you running with some kind of SSL certificate? (it's ok even if it's self-signed)

@weikinhuang
Copy link
Author

Yes, I'm running under https. After some more investigation, I realized that with code-server I have to explicitly disable default keybindings to use custom ones.

    { "key": "ctrl+d",                "command": "-editor.action.addSelectionToNextFindMatch"},

On regular vscode I do not have to do this.

@weikinhuang
Copy link
Author

Actually, after playing with this some more. I noticed that keyboard bindings do work, but they don't take effect until the keybindings file is saved once/edited. And I would have to do this every time the page is reloaded.

@weikinhuang weikinhuang changed the title Keyboard shortcuts with when=some os doesn't work Custom keybindings don't take effect until the keybindings.json file is saved on every page load Mar 22, 2019
@kylecarbs
Copy link
Member

Fixed in 4d576ab. New release coming 🚀

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

No branches or pull requests

3 participants