-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[android] Add buttonmap for back button in Android TV Remote Control #129
Conversation
dd4d42f
to
b53aa2b
Compare
b53aa2b
to
cb712f9
Compare
BACK button is again non-functional after installing a nightly build. After disabling the Joystick add-on, the BACK button starts to work again. |
Thanks for reporting, I found the issue. Will fix this week. |
Issue is fixed, we just need a new buttonmap for Android TV Remote Control. Can you make one? |
Sure. Never done one and no clue what is wrong with the one in this PR, but I am sure I can figure this out :) . |
Ha, forgot I did this last time. Go to controller configuration utility in settings and map the back button to back on the Kodi and remote profile (from Get More link). The resulting XML should look like this PR with some numbers being different. |
This is what came out:
However, Back again isn't the Back I am expecting. In fullscreen video it seems to bring up player controls. That whole stuff is just beyond me... Guess this mapping has to do with joystick.xml? Back button should do the equivalent to keyboard backspace IMHO. |
You're right, the system is confusing. There are actually three buttonmaps:
The issue is the libretro input API is so limited. It uses the "retropad" abstraction, but translating between retro controllers is a foreign concept for some of our users. The retropad introduces technological overhead that makes emulation inaccessible. So what I've done is create a massive system of different controller "representations". That way, we can represent controllers however we need to:
Here's an overview of the different representations: Driver representationThis is how the OS sees the controller. We know very little about the controller, and all buttons/axes are anonymous. E.g.: Name: "virtual-remote" Topological representation"Topology" is the way in which things are connected. You can visualize this: imagine a SNES controller next to a 360 controller, with lines drawn from each button on the SNES controller to a button on the 360 controller. The topology uses a controller ID and strings for button names. E.g.: Controller ID: game.controller.default Libretro representationThis is how libretro cores see input. It is defined by libretro.h. It identifies controllers by type and buttons by an ID. E.g.: Controller type: RETRO_DEVICE_JOYPAD GUI representationThis is how Kodi receives input. You define a topological profile, and map the button to a GUI action. E.g.: Controller profile: game.controller.default Do you see now why we map the back button to "b"? joystick.xml maps this button to XBMC.Back. You can see that the "back" button (Select on the SNES) has no global GUI action. So mapping driver button with ID 6 to "back" has no effect in Kodi, whereas "b" executes the back action. |
Motivation and Context
Report: https://forum.kodi.tv/showthread.php?tid=308480
How Has This Been Tested?
Tested on Shield TV.
Screenshots (if appropriate):
Android TV Remote Control:
![android tv remote control](https://user-images.githubusercontent.com/531482/32703036-fea95e94-c7a4-11e7-8114-d96b8ab352df.png)