Reputation: 13095
I would like to define a keybinding to insert a specific unicode character in VSCode. What is the right way to achieve this ?
Upvotes: 13
Views: 3983
Reputation: 21
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.
Upvotes: 2
Reputation: 13095
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": "Ψ"
}
}
Upvotes: 21