8

This question already has an answer here:

The TAB button usually moves focus. Is there a way to enter TAB symbols into text fields of opened web pages?

For example here, on Stack Exchange?

Is it possible to enter the symbol from keyboard?

marked as duplicate by Wes Sayeed, Kevin Panko, mdpc, fixer1234, Nifle Apr 25 '15 at 10:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5

Depending on your OS, open up a program like Notepad (Windows), and type a TAB. Highlight it, and copy it to the clipboard. Paste it into the text field.

As long as SuperUser doesn't edit it out (the application could if it wanted to), there is a tab character between the brackets below.

[Before Tab] [After Tab]

  • This site seems to convert tabs to 4 spaces. – unor Sep 16 '12 at 14:29
  • Hmm, when I click "edit" on this answer, there is a tab character between the two markers, although it doesn't look that way. The "four space" thing is used for indenting code in SuperUser, mostly because Tabs in browsers are a pain in the rear. :) – dangowans Sep 16 '12 at 14:33
3

I just found the solution after much searching, since the ASCII# for TAB is 9, in Windows you can just press ALT+009 (with the number pad). This should work on Mac too though I'm not sure about Linux. If you have a laptop it might be easier to use the AutoHotkey scripts below.

Here are two little AutoHotkey scripts that work for me from Windows:

#TAB::
  SendInput, {Alt Down}{Numpad0}{Numpad0}{Numpad9}{Alt Up}
Return

#TAB::
  Send, {ASC 009}
Return

Here they are mapped to Windows Key+TAB but you can map it to what ever you like.

[Before TAB] [After TAB]

Oh, it seems like SuperUser.com converts all blank space characters to single spaces. Well, it works in Gmail and other website forms. Hope this helps.

  • I'm new to AutoHotkey, so for me only Windows Key + TAB works as Forward TAB. How can I map Backwards TAB to Windows Key + Shift + TAB? – Candid Moon _Max_ Jan 9 '18 at 14:55
  • It's hard to understand what you're asking. I think you may be confusing TAB the symbol with TAB the function of switching focus. TAB the symbol has no forwards and backwards that I know of. TAB the function does, but my AHK script will print the ASCII symbol, it will NOT switch focus for you, backwards or forwards, to the best of my knowledge. – Andrew Jan 10 '18 at 16:52
  • ah, now I get it. I need to delete the tab symbol if there is one near the cursor, I guess I will try to find a solution later when I need that functionality. But I guess simple if would be enough in script if you can get symbols near cursor and you can delete symbols there too. – Candid Moon _Max_ Jan 10 '18 at 16:55
2

The character reference for a tab would be 	 (see Wikipedia). It depends on the form and the server-side process what happens with this character, though. If character references are not resolved, it would simply display "	". If character references are resolved, it depends on how the submitted content will be displayed on the page (e.g. inside of the pre element it should be displayed by default; inside of other elements it should be converted to spaces by default; you could change that behavior with CSS, though)

Test with character reference: [before tab] [after tab] (check the HTML source)

Not the answer you're looking for? Browse other questions tagged or ask your own question.