keyboardvisual-studio-codemarkdownediting

How to get a standalone backtick on German keyboard in Visual Studio Code


On a German keyboard layout, backtick + vowel gives you an accented character, e.g. backtick + a gives à. However, ctrl + backtick gives you a stand-alone backtick, e.g. ctrl + backtick + a gives

`a

This is obviously very useful for editing Markdown.

Here comes the problem: in Visual Studio Code ctrl + backtick is a keybinding for toggling the internal terminal. If I remove this keybinding in keybindings.json, the keybinding is gone but ctrl + backtick now gives nothing.

{   "key": "ctrl+shift+[Equal]"   }

Question: how do I configure VSC to give me a standalone backtick on ctrl + backtick?


Solution

  • This should bind your chosen key combination to write a single backtick:

     {
        "key": "ctrl+shift+[Equal]",
    
        "command": "type",
        "args": {"text":"`"},
    
        "when": "editorTextFocus && !editorReadonly"
     },