Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want a specific text to be entered into the currently focused field in the web page. This is mainly for templates etc. For example, Ctrl-H to enter "if blah then { ... } else { ... }". Is this possible ? Or one has to develop a new chrome extension ?

share|improve this question
Which OS do you have? – Karan Nov 25 '12 at 17:55

AutohotKey can do this for you.

SetTitleMatchMode, RegEx

#IfWinActive, - Google Chrome$

!V:: SendRaw "if blah then {...} else {...}"


Here Alt+V will enter the text you want to in any text filed of Chrome.

You have to assign shortcut for per template as you want, and its drawback is this that you have to run every script to use it anytime which need the RAM.

share|improve this answer
Since Chrome is available for OS X and Linux, besides mobile OSes like iOS and Android, and AHK is Windows-only, wouldn't it be better to know which OS the OP is using first? Of course he might be using Windows after all, but it would be nice if people bothered to provide all relevant details about their operating environment. – Karan Nov 25 '12 at 17:57
@Karan agree with you. My apologies to not asking about OS. – avirk Nov 25 '12 at 18:09
No apologies necessary dude, and your answer may very well be just want the OP wants as long as he's using Windows. I guess if he doesn't bother to comment or simply accepts your answer, Windows it is! :) – Karan Nov 25 '12 at 18:13
Oh, and as far as the problem of sending braces goes (if he actually wants to do so), won't using SendRaw instead of Send do the trick? – Karan Nov 25 '12 at 18:16
Ah yes! @Karan I forget about that. I don't use it too much that's why :P – avirk Nov 25 '12 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .