UPDATE (June 2019)
For those willing to toggle whitespace characters using a keyboard shortcut, you can easily add a keybinding for that.
In the latest versions of Visual Studio Code there is now a user-friendly graphical interface (i.e. no need to type JSON data etc) for viewing and editing all the available keyboard shortcuts. It is still under
File > Preferences > Keyboard Shortcuts (or use Ctrl+K Ctrl+S)
There is also a search field to help quickly find (and filter) the desired keybindings. So now both adding new and editing the existing keybindings is much easier:
Toggling whitespace characters has no default keybinding so feel free to add one. Just press the + sign on the left side of the related line (or press Enter, or double click anywhere on that line) and enter the desired combination in the pop-up window.
And if the keybinding you have chosen is already used for some other action(s) there will be a convenient warning which you can click and observe what action(s) already use your chosen keybinding:
As you can see, everything is very intuitive and convenient.
Good job, Microsoft!
Original (old) answer
For those willing to toggle whitespace characters using a keyboard shortcut, you can add a custom binding to the keybindings.json file (File > Preferences > Keyboard Shortcuts).
Example:
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+shift+i",
"command": "editor.action.toggleRenderWhitespace"
}
]
Here I have assigned a combination of Ctrl+Shift+i to toggle invisible characters, you may of course choose another combination.