Greetings Peeps,
I have a weird issue with a specific piece of equipment. When I receive physical keyboard input the app is not converting it properly, but it works on most devices I have tested with. The code is probably going to make more sense than what I write here.
I listen for key inputs in Java Code:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
And I receive the inputs with this:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
I don't know why the device is not returning the proper ascii characters, I can only think it is some kind of encoding error and I don't know how to check it.
Thanks,
Martin
			
			I have a weird issue with a specific piece of equipment. When I receive physical keyboard input the app is not converting it properly, but it works on most devices I have tested with. The code is probably going to make more sense than what I write here.
I listen for key inputs in Java Code:
			
				B4X:
			
		
		
		public boolean _onKeyDown(int KeyCode, KeyEvent event) {
        switch (KeyCode) {
 case 31:
            {      processBA.raiseEvent(null, "control_inputs", event.getUnicodeChar());
                return true;
            }
default:
            {      return true;
            }
        }And I receive the inputs with this:
			
				B4X:
			
		
		
		Sub control_inputs(i As Int)
        If i = 99999 Then
            Starter.myInputCase = "u"
            myKeyTimer.Enabled = True
        Else
            'Log(i)
            Dim s As String = Chr(i)
            If Starter.myInputCase = "u" Then
                s = s.ToUpperCase
                Starter.myInputCase = ""
            End If
            If i <> 1 And i <> 2 Then
                Starter.myInputToken = Starter.myInputToken & s
            Else
                Starter.myInputToken = Starter.myInputToken & i
            End If
            
End SubI don't know why the device is not returning the proper ascii characters, I can only think it is some kind of encoding error and I don't know how to check it.
Thanks,
Martin
 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		