# Open Horizontal Menu Items Without Mouse Click

**URL:** <https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [June 2, 2021, 3:58pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356 "2021-06-02T15:58:08Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.boog](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@m.boog](https://forum.inductiveautomation.com/u/m.boog)\
**Post date:** [June 2, 2021, 3:58pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/1 "2021-06-02T15:58:08Z")

</div>

Good Morning.

I’m working in Perspective, Gateway 8.0.16.

I have a horizontal menu component with submenus that I use for navigation. Our customer asked if we could replicate their old style of navigation, which was based on keyboard key presses. I can figure out how to capture key presses in the background and navigate as a result.

What I’m unable to do is use a key press to replicate the opening of a menu, as if a user had clicked on one of the menu items with the mouse to open its submenu items. Is it possible to initiate a mouse click event programmatically, or otherwise expand the menu items on the Horizontal Menu without a mouse click?

Thanks.

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [June 2, 2021, 5:35pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/2 "2021-06-02T17:35:25Z")

</div>

Might not be the best approach but you can use a robot to give that click, see: [Robot (Java Platform SE 7 ) (oracle.com)](https://docs.oracle.com/javase/7/docs/api/java/awt/Robot.html)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 2, 2021, 5:44pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/4 "2021-06-02T17:44:02Z")

</div>

> [@jespinmartin1](#):
>
> you can use a robot to give that click

Not in Perspective.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 2, 2021, 5:45pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/5 "2021-06-02T17:45:53Z")

</div>

Session level key event handlers are something we’re going to add to Perspective; it’s in development at the moment.

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [June 2, 2021, 5:46pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/6 "2021-06-02T17:46:04Z")

</div>

That is why I said is not a clever approach haha. Now I’m wondering what might be equivalent to Robot, usable in Perspective.

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [June 2, 2021, 5:49pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/7 "2021-06-02T17:49:01Z")

</div>

Great!

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [June 2, 2021, 5:52pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/8 "2021-06-02T17:52:17Z")

</div>

Probably nothing as that would be a hackers dream lol.

---

<div class="post-metadata">

**Author:** ![m.boog](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@m.boog](https://forum.inductiveautomation.com/u/m.boog)\
**Post date:** [June 8, 2021, 3:35pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/9 "2021-06-08T15:35:20Z")

</div>

@paul-griffith does this mean that any key pressed (regardless of where focus was when it was pressed) would be captured?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 8, 2021, 3:38pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/10 "2021-06-08T15:38:36Z")

</div>

I don’t know, to be honest. At some point, what we can actually intercept is very much up to browsers, so there may even be cross-platform concerns. I think that’s part of the reason the feature is taking a while to develop - we’re trying to iron out as many of these issues as possible before release.

---

<div class="post-metadata">

**Author:** ![m.boog](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@m.boog](https://forum.inductiveautomation.com/u/m.boog)\
**Post date:** [June 8, 2021, 3:42pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/11 "2021-06-08T15:42:29Z")

</div>

Fair enough. But nothing exists today within Ignition that can capture any key pressed at the view or session level, regardless of component focus?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 8, 2021, 3:44pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/12 "2021-06-08T15:44:15Z")

</div>

Correct.

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [May 26, 2022, 2:42pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/13 "2022-05-26T14:42:41Z")

</div>

@paul-griffith I want to confirm if there is a way to do the following (so far I think the answer is no):

Navigate the horizontal menu by hover over only with a click being required only on the final item you want to get into:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/a/3a44f0430a6aacfd5e49249532fbc0915b79f558.jpeg)

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 26, 2022, 3:06pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/14 "2022-05-26T15:06:53Z")

</div>

I don’t know for sure (I’m not involved in the front-end of Perspective, pretty much at all) but my understanding of what’s involved would suggest that you are correct. I think we’d have to implement handling for that at the JS level, and expose it as a prop. Sounds like a feature request/ideas post to me.

---

<div class="post-metadata">

**Author:** ![Shong\_Liew](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@Shong\_Liew](https://forum.inductiveautomation.com/u/Shong_Liew)\
**Post date:** [November 1, 2023, 2:12pm UTC](https://forum.inductiveautomation.com/t/open-horizontal-menu-items-without-mouse-click/47356/15 "2023-11-01T14:12:23Z")

</div>

Is it been feature requested?

And what is the timeline for that?
