Ah. Well if you’re just getting the key pressed from the keyboard object you can forget about that JavaScript.
Just add a tab character to the spritefont, set its width, and you’re good to go. You’ll probably have to type tab in something like notepad and copy/paste it over unless construct supports escaped characters like \t.