Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #4418
    ganghouwer01
    Participant

    Hello,

    I am developing a handebar controller with 8 buttons. I got everything working but i am running into trouble on a particular device. When KEYCODE_F5 (198) is send, on the tablet i use, the SOS function is opened. It seems harcoded in the tablets android system and not possible to change. Is het possible to use another keycode to get function working? Is there a way to map them within DMD2?

    Regards,

    #5096
    kdemotorsports
    Participant

    Can you share the key codes you have working? I tried KEY_UP, KEY_DOWN but they show DPAD_UP and DPAD_DOWN which doesn’t seem to be the same. Also should it be a bluetooth keyboard or a bluetooth gamepad?

    #5289
    ganghouwer01
    Participant

    It should work using the ESP32 BLE Keyboard library, but as far as i remember you need to send the correct decimal values, for reference look at the following link:

    https://www.arduino.cc/reference/en/language/functions/usb/keyboard/keyboardmodifiers/

    i am sending the following Key codes:

    int KEYCODE_F5 = 198;
    int KEYCODE_F6 = 199 ;
    int KEYCODE_F7 = 200;
    int KEYCODE_ENTER = 224;
    int KEYCODE_DPAD_UP = 218;
    int KEYCODE_DPAD_DOWN = 217;
    int KEYCODE_DPAD_LEFT = 216;
    int KEYCODE_DPAD_RIGHT = 215;

    #5291
    kdemotorsports
    Participant

    Thanks for the reply, I’ll give these key codes a try. I did manage to get the basics of up / down / left / right with the BleGamepad library. I’d love to get these others working too though. So thank you for the help.

    #7266
    Mikkel Jørgensen
    Participant

    Any updates on this, I have a list of keyCodes that almost works, they only one that doesn’t is the up and down function, and I can’t seem to find any that work for those two, I also tried the ble keyboard library and it doesn’t work either.

    0x28, // Enter key
    0x50, // DPAD Left
    0x4F, // DPAD Right
    0x52, // DPAD Up
    0x51, // DPAD Down
    0x3E, // F5 key
    0x3F, // F6 key
    0x40  // F7 key

    #7573
    João Pereira
    Keymaster

    I do not know what to reply here…
    Keycodes are keycodes, you can check a list of all the Android Keycodes:
    https://www.temblast.com/ref/akeyscode.htm

    We use:
    DPAD_UP, DOWN, LEFT, RIGHT
    ENTER
    F5
    F6
    F7

    BUT the app needs to “know” what controller you are using. If its an 8 button remote, try selecting the barbutton profile in the DMD controller selection setting.

    DMD2 Project Manager & Lead Developer
    Buy Me a Coffee

    #7586
    Mikkel Jørgensen
    Participant

    Thank you for a reference to the keycode map you use. I’m sorry to say there was no luck, I tried with Auto detect, 8 key generic and Bar buttons profiles. I only got some functionality on Auto Detect as before, this time it was on the DPAD_DOWN code 0x14 which resulted in a zoom in effect on the map. I stille had the best functionality width the key codes I used originally on Auto detect. I’m really at a loss for how to get this to work :(, Might just have to go and buy a controller insted off trying to integrate to the app myself.

    #7588
    ganghouwer01
    Participant

    <p style=”text-align: left;”>I can share my C/arduino code if you want. Maybe it will help u.</p>
    Anyway, i did not find the solution for my original problem, in guess i will end up buying another tablet.

     

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.