KeyPressed events work fine in a TextField tha has focus in a container control, but refuses to work for me when a button has focus in a container control. My challenge is to be able to trigger either an OK button or Cancel Button, (Enter or Esc), when a barcode has been scanned into a text field. If the barcode text passes a session database query test triggered by the TextChange event, the OK button gets the focus. The user then needs to n decide to accept the scanned code by pressing enter or cancelling by pressing Esc. No matter where I put the Keypressed event it doesn’t fire when the OK button has focus.
I’m open to any ideas on how to implement my need or any other solutions to make KeyPressed trigger on Enter or Esc. Oh, the standard browser used in our environment is Chrome on Windows which is what I primarily develop for.