Jump to content

Control characters, UniFormKeyPress, KeyPreview


snow

Recommended Posts

Hello,

in my VCL application the user can scan a barcode. The barcode is processed via the OnKeyPress-Event (KeyPreview = true) of the active form.
In VCL, here I also get control characters like e.g. #14 (SO), #15 (SI) or #29 (GS).

If I do the same in UniGUI, unfortuantely all control characters are filtered out.

Is there any chance to get these characters to be transmitted as well?

Regards

 

 

 

Link to comment
Share on other sites

If I scan the following example barcode (contains non-visible Field Separator GS = #29)

ASCII chars:  #31#32#33#29#34#35#36
Visible text: 123456

in VCL I get the #29 char in OnKeyDown of the form

whereas in UnGUI application I don't (just #31#32#33#34#35#36).

 

Link to comment
Share on other sites

18 hours ago, snow said:

I attached two basic projects (VCL + UniGUI) plus a barcode to reproduce the problem.

In VCL control char #29 is caught in FormKeyPress and displayed in the Memo, in UniGUI it isn't.

Hello,

I will try to check.

Link to comment
Share on other sites

One way is by using a simple barcode scanner connected to the PC via USB (e.g. Honeywell MS9540) and scanning the barcode while the application is focused.

The other way is using a handheld scanner (e.g. from Zebra with Android) and running the Web app in the browser of that device (VCL app via RDP).

So for testing purposes number one should be easier.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...