How can I change the key bindings in VS Code to change the tab key to four spaces?

Solution for How can I change the key bindings in VS Code to change the tab key to four spaces?
is Given Below:

I’m running the latest version of VS Code and Windows 10. I’m learning Python and would like all of my indentations to be spaces. However, I’d like to use the tab key to enter those spaces.

I’ve tried many different variations in the keybindings.json file with no luck.

[
    {
        "key": "tab", 
        "command": "-tab"
    },

    {
        "key": "tab",
        "command": "type",
        "args": {"text": "       "}
    }
]

With the above code, I was just trying out many spaces to check the difference. However, when I save this as the json file, it doesn’t give expected behavior. It will indent the full amount, but when I backspace I’d expect it to go back one space. Yet, it backs up to where a standard tab would be.. hitting it again returns to the beginning of the line.

Is it possible for the tab key to simply be used as a macro for four spaces?

You don’t need to change it in json files. You can search Tab Size in VSCode Settings and change its value to 4. If this does not work, click the Editor: Detect Indentation link and disable it. This should solve the problem.