I would like to intercept characters typed into the keyboard, but I also need to intercept if backspace and enter are pressed.
I am currently invoking the keyboard by setting focus on a textview and can intercept individual characters, but not the back/enter buttons.
Any suggestions as to how I can accomplish this?
Private Sub TextView1_TextChanged (OldText As String, NewText As String)
If NewText = "~" Then Return
If NewText = "" Then
Log("backspace")
Else
Dim c As String = NewText.SubString(NewText.Length - 1)
Log($"new char: ${c}, codepoint: ${Asc(c)}"$)
End If
Dim field As B4XView = Sender
Sleep(0)
field.Text = "~"
End Sub