Key events not firing on Dropdown List component in Vision

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.

Any help? Using version 8.1.6.

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

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.

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

2 Likes