As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label focus. Show all posts

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.

1Quick Solution

For a long time, YouTube and Google Groups always make me groan. I often ended up with searching something like o gm, I was opening Gmail actually.

Their search boxes steal my precious control. If you are using that slow mouse—point, point, and click, you probably have never noticed that YouTube and Google Groups kindly help you enter the search box, they thought its convenient for users. Wrong! When most of sites dont help users with thatand why they dont? Think, YouTube and Google Groups! you are only creating burden for users.

Luckily, its easy to fix with Vimperator:

" Get my damn focus back
autocmd PageLoad (www\\.youtube|\\.com :normal <Esc>

I use autocmd to emulate a keypress of Escape to exiting Input mode.

A side note if you are also using Gmails and Readers shortcut keys a lot, the following command let you enter Pass through mode automatically:

" Enter passthrough mode automatically in Gmail, Reader
autocmd LocationChange .* js modes.passAllKeys = /(mail\.google\.com|www\.google\.com\/reader\/)/.test(buffer.URL)

I was hoping I could find a way to re-map a and A because I usually have to re-add bookmark after I wanted to Mark all as read using A, its a removal of bookmark. I couldnt find any, but the method above is acceptable.