I would like to define a keybinding to insert a specific unicode character in VSCode. What is the right way to achieve this ?
I would like to define a keybinding to insert a specific unicode character in VSCode. What is the right way to achieve this ?
VSCode has a type command to handle exactly this kind of use case:
In keybindings.json:
{
"key": "ctrl+alt+1 s",
"command": "type",
"args": {
"text": "Ψ"
}
}
Type and select "Preferences: Open Keyboard Shortcuts (JSON)" in the Ctrl+Shift+P menu in VSCode.
The file is called keybindings.json but it doesn't seem to be indexed quite as such in search for some reason.