How Do I Cancel Web Search and Display Home Page?

Sometimes I don't want to type keyword search, I want to exit the search box and jump to the home page, but why is my macro not working?

Google.kmmacros (3.0 KB)

image

Usually I type in keyword search, but when I press the command button, I want to open the Google homepage.

Maybe my steps are wrong. Is anyone willing to provide me with a method? :pray:

As I see it, you are asking the macro to do two things:

  1. do a Google search
  2. IF [the modifier key is pressed] THEN [open the Google home page]

I think what you want is probably:

  • IF [the modifier key is pressed] THEN [open the Google home page] ELSE [do my search]

Good luck :wink:

I did it, still not working.

Thank you for your reply.

If you were willing to forego just the one modifier key and instead use CMD-ยง (or any other combination), then the following would be a work-around. As always, there are probably more elegant solutions!

Two Macros.

1st Macro Hotkey (F20) with just the Search the web with keyword action.

2nd Macro Hotkey (CMD-F20) Load google homepage

If you hit F20 and then decide you want the homepage, CMD-F20 will cancel that macro and load google homepage.

The attached macro has some unnecessary cancel action steps and different hotkeys. Hope that helps. I think the issue is that once you have executed the macro, it is done, it's not sitting there waiting for another keystroke. That would take something more complicated. My solution, while not elegant, does what you ask I think at the expense of an extra keystroke.

TEST Macros.kmmacros (4.0 KB)

See possible solution below.


I hope you don't mind that I have revised your topic title to better reflect the question you have asked.

FROM:
Sometimes I don't want to type keyword search, I want to exit the search box and jump to the home page, but why is my macro not working?

TO:
How Do I Cancel Web Search and Display Home Page?

This will greatly help you attract more experienced users to help solve your problem, and will help future readers find your question, and the solution.


Possible Solution

You might try this macro.
If you press ESC instead of RETURN in the Search box, it will cancel the search and display the Google home page. You might need to hold down the ESC key for 0.5 sec or so.

MACRO:   Search The Web or Go To Home Page


#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/1/1/11091023e5fe5555ece68504e88bdf9fe1670e20.kmmacros">Search The Web or Go To Home Page.kmmacros</a> (2.4 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**

---



![image|458x658](upload://1Rtf2jlm6JMHwZ1LuqLugBmBUpP.png)
1 Like

Thanks, not only Google, but also a lot of websites need to be set up like Quora.com and keyboardmaestro.com, sometimes keyword search, sometimes open the home page to see new posts. thank you very much!

Great, my problem is solved, the Esc key works. Thank you so much. I don't mind if you change the question, because my English is not very good, I have always used Google Translate to post.

1 Like