personalapps
Member
I have a BLE mouse connected to b4x app. How to detect the mouse click? I don't want to detect press on any particular view. This code doesn't work in B4X:
B4X:
#if B4A
Private Sub mRoot_Touch (o As Object, ACTION As Int, x As Float, y As Float, motion As Object) As Boolean
#else
Private Sub mRoot_Touch (Action As Int, X As Float, Y As Float)
#end if
If ACTION = mRoot.TOUCH_ACTION_DOWN Then
Log($"Touch action down"$)
Else If ACTION = mRoot.TOUCH_ACTION_UP Then
Log($"Touch action down"$)
End If
#if B4A
Return True
#end if
End Sub