I have an MFi-certified gamepad that is natively supported by iOS. I’ve verified that the D-pad is correctly mapped by checking in “Settings → Game Controller → Default Controls.” I also confirmed through JavaScript that events are triggered on Hardware Tester when the d-pad is pressed. The “Up” button is mapped to B12, “Down” to B13, “Left” to B14, and “Right” to B15. Please see the screenshots below for reference.
Here’s the issue: I tested the gamepad within the “Settings → Review → GamePads” screen in AnkiMobile. As expected, when I press the A, B, X, and Y buttons, the corresponding “Pressed” messages appear (e.g., “Pressed Y”). However, when I press the left arrow key on the D-pad, the message “ Pressed” does not appear. The same issue occurs with the right, up, and down arrow keys.
I had only tested GameSir X2 gamepad at the time of writing the question. I actually have two gamepads: the GameSir X2 and the 8BitDo Zero 2. I saw that you had tried the D-pad with the 8BitDo Zero 2 and it worked, so I tried the D-pad with my 8BitDo Zero 2 as well. At first, my 8BitDo Zero 2 sent an analog stick signal when the D-pad was pressed. Then, I configured it to send a digital signal by holding down the D-pad Up and Select keys.
Surprisingly, now a ‘pressed’ message pops up when I press the D-pad, under Preferences → Review → Gamepads in AnkiMobile. However, this is super weird because the D-pad on the GameSir X2 has the same key mapping as the D-pad on the 8BitDo Zero 2 when I test them out on the Hardware Tester. Yet, the D-pad on the GameSir X2 is not working for AnkiMobile.
If you have any suggestions for me to try, please let me know later. Thank you for your hint.
Unfortunately if you’re sure it’s sending digital inputs, this is not something I can easily fix. AnkiMobile tells iOS “notify me when the dpad is pressed”. If your controller is not causing those notifications to be sent, it implies that the buttons are not correctly mapped to the extended controller profile (not sure if it’s an issue with the joypad, or iOS).