Can we use "Tab" to enter 4 spaces?

I found a method.

We can use “AutoHotkey”

then use the script below, “ctrl+space” will send 4 spaces to the editor.

^space:: send {space 4}
return

But, is there a better way?