• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

missing buttons? Firestick and maybe others.

Rob Hewitt

Active member
Tutorial Author
Joined
Aug 30, 2017
Messages
113
Hi,

I have searched all 512 Keydown flags and also tried all combinations of JoyDown via a Mak's JoyTest program but I can't seem to find the fire buttons.

On my Amazon Firestick the remote only registers the 4 directions. Select, Back, Home, Menu, Rewind, Forward and Play all don't register.

When I try a bluetooth gamepad, the analogue directions worked but no other button registered.

if it's not in there is there a way of reading them at all?

Cheers,
 
I should also say that I have the line

#ANDROID_GAMEPAD_ENABLED = True

at the top of my code also
 
the input handling in Cerberus under Android definitely needs looking at at some point. Bluestacks (which I know isn't a real Android device but other software doesn't have problems on it) only reports cursor keys from a whole keyboard.

Does anyone know of a java (or C) library that can be used to capture input (keys/joypad/sensors) outside of Cerberus' ways?
 
the input handling in Cerberus under Android definitely needs looking at at some point. Bluestacks (which I know isn't a real Android device but other software doesn't have problems on it) only reports cursor keys from a whole keyboard.

Does anyone know of a java (or C) library that can be used to capture input (keys/joypad/sensors) outside of Cerberus' ways?

Hello Rob, Below is the code I use to read keyboard events, it works on Android, iOS, Windows and Mac Console (GLFW3) and HTML5. It picks up keyboard codes like, Home, End, PageUp, Del, etc.
Give it a try and you may get the key code you are looking for, just copy the code below, paste it in Cerberus, save it and run.


Code:
Strict

Import mojo2

Class TestApp Extends App
    Field canvas:Canvas
    Field cw:Int, ch:Int
    Field char:Int, lastchar:Int, st:Int
    Field name:String
    Field txt1:String = "Press the keys on the keyboard"
    Field txt2:String = "Key code:"
    Field txt3:String = "Char:"

    Method OnCreate:Int()
        canvas = New Canvas()
        cw = DeviceWidth(); ch = DeviceHeight()
        SetUpdateRate(30)
        Return 0
    End
      Method OnUpdate:Int()

        ReadKeyboard()
        lastchar = char
        Return 0
    End
    Method OnRender:Int()
        canvas.Clear()
        canvas.SetColor(0.0, 1.0, 0.0)
        canvas.DrawText(txt1, cw * 0.5 - (txt1.Length() * 8) * 0.5, 100)
        canvas.SetColor(1.0, 1.0, 0.0)
        canvas.DrawText(txt2 + lastchar, cw * 0.5 - (txt2.Length() * 8) * 0.5, 200)
        canvas.SetColor(0.0, 1.0, 1.0)
        canvas.DrawText(txt3 + name, cw * 0.5 - (txt3.Length() * 8) * 0.5, 250)
        canvas.Flush()
        Return 0
    End
    Method ReadKeyboard:Int()
        If st = 0 Or MouseDown()
            st = EnableKeyboard()
        EndIf

'        Local idx:Int
       
        char = GetChar()
        If char = 0 Then char = lastchar
        name = String.FromChar(char)

'        If char = 13 'enter
'            DisableKeyboard()
'            st = 0
'        ElseIf char = 8 'back space
'            idx = name.Length()
'            name = name[0 .. idx - 1] 'remove last char
'        EndIf
        Return char
    End
End

Function Main:Int()
    New TestApp()
    Return 0
End
 
Thanks, I tried the above in Bluestacks and no keys worked. This could be Bluestacks of course.
 
Drat. Upgraded my phone from an s6 to an s9 and now my bluetooth pad (same one that was fine before) no longer works in my games in the app store. And yet still works fine in the other apps and games that it worked on on the s6. :-(
 
Back
Top Bottom