Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Visual Studio's "Home" page when Pressing the Web Home key

I search the web a lot when writing code. When working in Visual Studio 2008, every time I hit the keyboard's Web Home key (you know the one on every multi media keyboard with the house on it) it opens a browser in VisualStudio - usually to something on MSDN.

Not that I don't like MSDN, but I'd like to open a real browser on my second monitor and go to my home page. Is there a way to tell Visual Studio not to open it's own home page and instead let Windows process it?

like image 303
Paul Alexander Avatar asked Nov 05 '22 19:11

Paul Alexander


1 Answers

You can bypass Visual Studio processing this key by means of the excellent free utility AutoHotkey. It can help with all sorts of automation needs, but in particular Overriding or Disabling Hotkeys of course, see the list of Hotkeys (Mouse, Joystick and Keyboard Shortcuts) too.

Your scenario requires Context-sensitive Hotkeys; the necessary parameters to discriminate target applications via Window class and/or title can be determined via the included Window Spy utility.

While I'm working on a laptop right now, which doesn't feature a Browser Home key, I just tested the following script fragment successfully with another keyboard shortcut:

#IfWinActive ahk_class wndclass_desked_gsk ; Visual Studio browser home key hook
Browser_Home::Run firefox.exe http://example.com
#IfWinActive ; Subsequent mappings/hotkeys in effect for all windows again now

I usually start one keyboard shortcut related script (incidentally called Windowskey.ahk) automatically via my user Start Menu\Programs\Startup folder, and launch other scripts from there via a hotkey as needed ;)

like image 84
Steffen Opel Avatar answered Nov 15 '22 14:11

Steffen Opel