How to detect different field edition "endings" in Web

I’ve seem that Xojo removed keystrokes events from web, but the detection of a small set of the special keys like ESC, TAB and ENTER are crucial to many, many systems. Specially those tied to hardware that emits such keystrokes like barcode readers that would not change such behavior.
I have a desktop app where a “special field” that responds differently if ended by TAB or ENTER. It’s how such market is used to. ENTER skips some extra conference steps and accepts the value (if valid) directly, clears the field, and start the entry again. TAB shows data about it and focus on a button that does what ENTER does. ESC clears the field. Such code can be read by scanner that sends its value to the data field and finishes it with a CR code (0x0D, Enter). I would say that detecting such thing is crucial to convert such system (and many others similar to this one) to web.

Can we handle this currently, in native Xojo, without workarounds like injecting proprietary JavaScript subject to a future mess; or I must create a feature request asking a way to solve such basic problem?

I´ll take the silence as “there’s no solution”.

Not without workarounds like TP_WebKit

Sad news for me, Tim. We know you did a great job hacking the system to fix it, but I wished that we had a solution not touching the guts of the beast to avoid a future break.

Now I will have to think my options:

  1. Use TP_WebKit
  2. Write my own workaround (trying to be lighter as possible)
  3. Use another tool for this job
  4. Try to redesign the UX in some unusual way that clients could refuse it.

Would judicious use of the Default and Cancel buttons work?

Not sure yet. Will play a bit here trying to discover.

With 20r2.1 I destroyed my simple session locking my UI by pressing 2 ESCs in sequence.

Also tried to disable the default behavior by code, the button has lost the blue color, but still were responding to ENTER everywhere.

So this simple test showed me that 2020r2.1 is ultra unstable. Will try later with 2021.

But your idea was a way to build a practical solution. It was a pity not working.




Case 64220

Oh ship. That one was fixed just after the 2021r1 release. :frowning_face: