# Virtual Key Pressend in Perspective

**URL:** <https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 17, 2021, 1:32am UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162 "2021-11-17T01:32:39Z")\
**Posts on this page:** 11\
**Page:** 1

<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:** [November 17, 2021, 1:32am UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/1 "2021-11-17T01:32:39Z")

</div>

Is there a way to send a virtual key pressed in Perspective Session. Specifically “Ctrl”.  
The idea would be to select a checkbox as a virtual Ctrl  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d8a20f643c98d5a3f617477d792d2746bb181113.png)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 17, 2021, 7:54am UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/2 "2021-11-17T07:54:01Z")

</div>

why would you want this?

---

<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:** [November 17, 2021, 2:14pm UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/3 "2021-11-17T14:14:13Z")

</div>

Operability. Avoid the usage of both hands, one on the keyboard and other in the mouse.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 17, 2021, 2:28pm UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/4 "2021-11-17T14:28:11Z")

</div>

What would they need to ctrl+click?

I doubt this is possible, it be unsecure\* if browsers allowed this xd

---

<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:** [November 17, 2021, 2:30pm UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/5 "2021-11-17T14:30:01Z")

</div>

For multiple selections in a tree component

---

<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:** [November 17, 2021, 2:43pm UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/6 "2021-11-17T14:43:50Z")

</div>

Why unsecure?  
This Mozilla developer online allows it [Document: keydown event - Web APIs | MDN (mozilla.org)](https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event)

Ones in focus, it detects as

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/e/7e6c82b5a7637a9b23ff65452d9d8d77b623efa3.png)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 17, 2021, 2:45pm UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/7 "2021-11-17T14:45:39Z")

</div>

No this is listening to key events not sending out ones

---

<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:** [November 17, 2021, 2:49pm UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/8 "2021-11-17T14:49:10Z")

</div>

Indeed, you’re right.

Do you know any way to make multiple selections in a tree component without using Ctrl key?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 17, 2021, 2:59pm UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/9 "2021-11-17T14:59:17Z")

</div>

no ☹

---

<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:** [November 17, 2021, 3:53pm UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/10 "2021-11-17T15:53:37Z")

</div>

I don’t think you’ll be able to do this. The frontend component would have to check for the actual ctrl key during the mouse event, _or_ some artificial boolean that’s exposed in the props you could bind to - it doesn’t currently do anything like that.

---

<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:** [November 20, 2021, 8:35pm UTC](https://forum.inductiveautomation.com/t/virtual-key-pressend-in-perspective/53162/11 "2021-11-20T20:35:05Z")

</div>

Ok, thanks @paul-griffith
