# Key events not firing on Dropdown List component in Vision

**URL:** <https://forum.inductiveautomation.com/t/key-events-not-firing-on-dropdown-list-component-in-vision/47696>\
**Category:** Ignition\
**Created:** [June 11, 2021, 2:40pm UTC](https://forum.inductiveautomation.com/t/key-events-not-firing-on-dropdown-list-component-in-vision/47696 "2021-06-11T14:40:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![trusk](https://avatars.discourse-cdn.com/v4/letter/t/8491ac/32.png) [@trusk](https://forum.inductiveautomation.com/u/trusk)\
**Post date:** [June 11, 2021, 2:40pm UTC](https://forum.inductiveautomation.com/t/key-events-not-firing-on-dropdown-list-component-in-vision/47696/1 "2021-06-11T14:40:23Z")

</div>

It appears that the Dropdown List component is not firing on any key event. I am trying to use a keyTyped script to build a string to use in my query for the data binding. Simply writing a string to a test custom property does not work making me believe the event is not being handled.

Someone else saw the same issue on the following post, but there were no responses.

> [@Keypressed event on dropdownlist](http://forum.inductiveautomation.com/t/keypressed-event-on-dropdownlist/30166):
>
> Hi, i try to execute a script on a dropdown list after press enter, but i cant get it work. It seems the event never fire (KeyPressed , KeyReleased) . Im Using Ignition 8.05 on windows. works on textbox. Any ideas? Or is it a bug? br, Roland

Any help? Using version 8.1.6.

---

<div class="post-metadata">

**Author:** ![roland.scheuer](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@roland.scheuer](https://forum.inductiveautomation.com/u/roland.scheuer)\
**Post date:** [June 28, 2021, 9:59pm UTC](https://forum.inductiveautomation.com/t/key-events-not-firing-on-dropdown-list-component-in-vision/47696/2 "2021-06-28T21:59:24Z")

</div>

@eric.petke did you solve it? I think you use it.

---

<div class="post-metadata">

**Author:** ![osolorzano](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/osolorzano/32/6432_2.png) [@osolorzano](https://forum.inductiveautomation.com/u/osolorzano)\
**Post date:** [June 28, 2021, 10:27pm UTC](https://forum.inductiveautomation.com/t/key-events-not-firing-on-dropdown-list-component-in-vision/47696/3 "2021-06-28T22:27:14Z")

</div>

What’s your code look like? On a dropdown list, I was able to see the keyTyped event being fired with this script as long as the dropdown was in focus  
`print event.keyChar`  
If you are attempting to use the Enter key like in the linked forum post it’s worth noting that the keyCode on the keyTyped event is always 0, which is a limitation from Java. If you want to use keyCode, you have to use a keyPressed or keyReleased event.

---

<div class="post-metadata">

**Author:** ![trusk](https://avatars.discourse-cdn.com/v4/letter/t/8491ac/32.png) [@trusk](https://forum.inductiveautomation.com/u/trusk)\
**Post date:** [June 29, 2021, 2:07pm UTC](https://forum.inductiveautomation.com/t/key-events-not-firing-on-dropdown-list-component-in-vision/47696/4 "2021-06-29T14:07:37Z")

</div>

Since I posted this the customer has dropped the requirement to build the string as typed. So I pretty much abandoned the problem. However, I did go back and test the issue again using the following script in the keyTyped event handler and it worked as expected. Thanks for the response!

ls = event.source.likestring

ls = ls + event.keyChar

event.source.likestring = ls
