# Command-H menu select

**URL:** <https://forum.xojo.com/t/command-h-menu-select/52762>\
**Category:** General\
**Created:** [March 14, 2020, 8:06pm UTC](https://forum.xojo.com/t/command-h-menu-select/52762 "2020-03-14T20:06:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Hunt](https://forum.xojo.com/user_avatar/forum.xojo.com/aaron_hunt/32/23752_2.png) [@Aaron\_Hunt](https://forum.xojo.com/u/Aaron_Hunt)\
**Post date:** [March 14, 2020, 8:06pm UTC](https://forum.xojo.com/t/command-h-menu-select/52762/1 "2020-03-14T20:06:46Z")

</div>

I have assigned Command-H to select a menu item in my app.

On Mac, when I type Command-H, the application window disappears. I have return true at the end of the menu handler. The handler never fires.

How do I stop this stupid behaviour?

---

<div class="post-metadata">

**Author:** ![Aaron\_Hunt](https://forum.xojo.com/user_avatar/forum.xojo.com/aaron_hunt/32/23752_2.png) [@Aaron\_Hunt](https://forum.xojo.com/u/Aaron_Hunt)\
**Post date:** [March 14, 2020, 8:22pm UTC](https://forum.xojo.com/t/command-h-menu-select/52762/2 "2020-03-14T20:22:16Z")

</div>

I just discovered, the Command-H keyboard shortcut doesn’t even show up in the menu, no wonder the handler doesn’t fire. There seems to be no way to assign Command-H as a shortcut.

---

<div class="post-metadata">

**Author:** ![anon93744516](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@anon93744516](https://forum.xojo.com/u/anon93744516)\
**Post date:** [March 14, 2020, 8:37pm UTC](https://forum.xojo.com/t/command-h-menu-select/52762/3 "2020-03-14T20:37:32Z")

</div>

> [@479117:@Aaron Hunt](#):
>
> On Mac, when I type Command-H, the application window disappears.

I think that’s because Command-H is already spoken for in your macOS App menu. I assume this is an automatic assignment for all macOS Desktop apps.

For example, under the Xojo app menu you’ll see it as well as any Desktop app you create in Xojo (at least in mine they automatically appear, without me doing anything).  
 ![](https://basic.fyi/screenshots/cmd-h-macos.png)

I hope that helps.

---

<div class="post-metadata">

**Author:** ![Aaron\_Hunt](https://forum.xojo.com/user_avatar/forum.xojo.com/aaron_hunt/32/23752_2.png) [@Aaron\_Hunt](https://forum.xojo.com/u/Aaron_Hunt)\
**Post date:** [March 14, 2020, 10:55pm UTC](https://forum.xojo.com/t/command-h-menu-select/52762/4 "2020-03-14T22:55:30Z")

</div>

Thanks, Scott. You are correct. I had not seen that.

Is there no way to stop that menu item from appearing under the application menu?

---

<div class="post-metadata">

**Author:** ![anon93744516](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@anon93744516](https://forum.xojo.com/u/anon93744516)\
**Post date:** [March 14, 2020, 11:59pm UTC](https://forum.xojo.com/t/command-h-menu-select/52762/5 "2020-03-14T23:59:43Z")

</div>

> [@479139:@Aaron Hunt](#):
>
> Is there no way to stop that menu item from appearing under the application menu?

Not as far as I know.

You can add custom menu options to that menu list using [ApplicationMenuItem](https://documentation.xojo.com/api/language/app.htmllicationMenuItem).

But I suppose if you could access the top “MyApp.debug” `MenuItem` somehow, you might be able to walk down the list and maybe remove some items using [RemoveMenuAt](https://documentation.xojo.com/api/deprecated/menuitem.html#menuitem-removemenuat).

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [March 15, 2020, 12:17am UTC](https://forum.xojo.com/t/command-h-menu-select/52762/6 "2020-03-15T00:17:34Z")

</div>

> [@479139:@Aaron Hunt](#):
>
> Is there no way to stop that menu item from appearing under the application menu?

Do you want to fight against the OS ?

Along the years, this happened to me too, I changed my mind and choosed a different one.

Be creative, use one that is not OS reserved

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [April 29, 2021, 4:19pm UTC](https://forum.xojo.com/t/command-h-menu-select/52762/7 "2021-04-29T16:19:15Z")

</div>


