iOS Question Activity_KeyPress -> B4i

D

Deleted member 103

Guest
Hi,

what is the equivalente of Activity_KeyPress/Activity_KeyUp in B4i?
 
D

Deleted member 103

Guest
In principle I would like to implement something like:
B4X:
Sub Activity_KeyPress (KeyCode As Int) As Boolean 'return true if you want to consume the event
    If KeyCode <> 160 Then
        ...
    Else If KeyCode = KeyCodes.KEYCODE_VOLUME_DOWN OR KeyCode = KeyCodes.KEYCODE_VOLUME_UP Then
        ...
    End If
    Return False
End Sub

Sub Activity_KeyUp (KeyCode As Int) As Boolean
    If KeyCode = 160 OR  KeyCode = KeyCodes.KEYCODE_VOLUME_DOWN OR KeyCode = KeyCodes.KEYCODE_VOLUME_UP Then
        ...
    End If
    Return False
End Sub
 
Upvote 0
Top