AutohotKey: replace Tab in web page

Usually, we use tab to realize the indentation in code. However, when we write some code in web editor, such as, writing code in a post, the ‘TAB’ moves the control to the next form element (like a button or a check box) instead of inserting the tab character.


^Right::
tabspace:=" "
send,%tabspace%
return

This AHK code realizes ‘ctrl+ right’ to insert four space in every code editor!!
^ represents ctrl key and Right represents the right arrow in keyboard.
In this code, the tabspace has four spaces. However. you can also define other space number as you want.

News Reporter
Dr. Lu

Leave a Reply

Skip to toolbar