Solved! How to change default browser to shortcut

noob25002

Member
Sep 16, 2018
95
3
71
Hello,

How do I change my default browser to a shortcut? Windows 10 does not let me browse through.

I have an airmouse, and every time I press the Home button, if I'm focused on a page (in Firefox) it goes to the default landing page.
I can create a shortcut with a command line to open a new window instead, but I need to be able to change what Windows starts when the Home button is pressed.
The Home button on my airmouse cannot be remapped.

Thank you.
 

mikeymikec

Lifer
May 19, 2011
19,973
14,293
136
Ideally if there was a way to alter the behaviour of the home button on your mouse then that's the route I'd head down. I can think of only two other options:

1 - Use another browser which gives you the desired behaviour when you press the home button.
2 - Change your normal Firefox shortcut to start a different Firefox profile and have -no-remote on the end, and for it not to be the default Firefox profile. Then when you click on the Home button you ought to get a new Firefox process + window, unfortunately it will be with a different Firefox profile.

I assume you mean by "if I'm focused on a page (in Firefox) it goes to the default landing page." that if you're say on the BBC news website, pressing the home button changes the site in the bbc tab to the default home page.
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,103
126
https://www.softpedia.com/get/System/System-Info/Keyboard-Test-Utility.shtml

Keyboard-Test-Utility_1.png


https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes

https://autohotkey.com/docs/KeyList.htm

https://jacksautohotkeyblog.wordpre...es-with-autohotkey-beginning-hotkeys-part-14/

Might be helpful.

==

Your airmouse Home button probably emits virtual key code VK_BROWSER_HOME (0xAC)

==

The following is possible AutoHotKey solution if it's what you want.

Tested: save the code as .ahk file.

The following codes assume your airmouse Home button emits virtual key code 0xAC.

Code:
; BROWSER HOME virtual key code is 0xAC
VKAC::return            ; This will disable virtual key BROWSER HOME.

Code:
VKAC::Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"            ; This will Run Chrome

Code:
VKAC::Run "C:\Program Files\Mozilla Firefox\Firefox.exe"            ; This will Run Firefox

and this will lauch Microsoft Edge , from command line.
Code:
VKAC::Run %ComSpec% /c "start microsoft-edge:"

Run any code you like.

https://autohotkey.com/docs/FAQ.htm

There are several ways to make a script (or any program) launch automatically every time you start your PC. The easiest is to place a shortcut to the script in the Startup folder:

  1. Find the script file, select it, and press Control+C.
  2. Press Win+R to open the Run dialog, then enter shell:startup and click OK or Enter. This will open the Startup folder for the current user. To instead open the folder for all users, enter shell:common startup (however, in that case you must be an administrator to proceed).
  3. Right click inside the window, and click "Paste Shortcut". The shortcut to the script should now be in the Startup folder.
 
Last edited:
  • Like
Reactions: noob25002

noob25002

Member
Sep 16, 2018
95
3
71
I also have a wired Microsoft Ergo 4000 which has a 2nd Home button on it, listed at Home/Web. On default it behaves the same as the Home button on the airmouse. Microsoft has software for the keyboard to remap the Home/Web button, but this only affects the keyboard.

The button for the Home/Web is listed as:
VK Code: ACh (172) VK_BROWSER_HOME
Scan Code: 00h (0) (Extended)
For a split second the Scan Code is 32h (50), without Extended.
This is the same for the keyboard and airmouse.

I was successful with this script:
BROWSER HOME virtual key code is 0xAC
VKAC::Run "C:\Program Files\Mozilla Firefox\Firefox.exe"

I remember trying to use AutoHotKey but SpyHunter 5 told me it's: ctb-locker critroni ransomware
I tried a few downloads a now it does not show up, so it might have been a false positive.
The way it works now is the way it used to work in Win7.

Thanks for all your help, @mxnerd.