After I published the method using Vimperator, I found out it wont work if user switch to other tab before the page is loaded. The emulated keypress will be only emulated the currently active tab, and that may not be YouTube or Google Groups. Since Google Groups started the new interface, I removed that part of code from my Vimperator configuration, Google Groups doesnt steal focus anymore. Instead, I even enable Pass Through mode for Google Groups.
A while earlier, I was seeking if there is a way I could open a link from commandline and Firefox does not raise its window. I havent found an answer for that but I accidentally stumbled on an answer on Super User and later I found how to disable form focusing on MozillaZine Knowledge Base.