I am trying to use a barcode scanner with the suffix set to CRLF - the Enter keystoke is appended to the end of the scanned barcode data.
I want to detect the Chr(10) so I can call another sub to use the data scanned into the EditText control.
Below is my code:
There is nothing that I have been able to do to detect the Chr(10) sent by the barcode scanner - this leads me to think that maybe non-viewable ascii characters are not sent to the TextChanged sub.
I have verified that the barcode scanner is adding the Enter key to the scanned data.
I can program the scanner to send viewable characters as the suffix and this works fine but Enter key and Tab keystrokes are not detected in the TextChanged sub. Am I doing something wrong here?
I want to detect the Chr(10) so I can call another sub to use the data scanned into the EditText control.
Below is my code:
text changed:
Sub Part_Number_TextChanged (Old As String, New As String)
Dim ThisPart As String = New
If ThisPart.EndsWith( Chr(10) ) = True Then
Log("suffix found")
Dim StringLen As Int = ThisPart.IndexOf( Chr(10) )
Part_Number.Text = ThisPart.SubString2(0,StringLen).Trim
AddItem
End If
End Sub
There is nothing that I have been able to do to detect the Chr(10) sent by the barcode scanner - this leads me to think that maybe non-viewable ascii characters are not sent to the TextChanged sub.
I have verified that the barcode scanner is adding the Enter key to the scanned data.
I can program the scanner to send viewable characters as the suffix and this works fine but Enter key and Tab keystrokes are not detected in the TextChanged sub. Am I doing something wrong here?