Hi, I have a text field which waits for a keyReleased event of the VK_ENTER key, then it triggers a function to verify the value introduced, and if its correct it sends the text field value to the PLC.
This works fine with a physical keyboard, however as the virtual keyboard doesnt work with the key listener, I had to improvise the following solution to make it work, I used an auxiliar property named “clicked”, to prevent the validateInput function to be executed, when the text propertyChange is triggered at the component start.
mouseClicked event:
event.source.parent.clicked = 1
propertyChange event:
if event.propertyName=="text" and event.source.parent.clicked and shared.mylib.validateInput():
event.source.parent.forcedValue= event.newValue
event.source.parent.clicked = 0
I dont really like this solution, and I bet there is a better way to accomplish this. I hope somebody can give me a hint to solve this issue.
Regards