Skip to content
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

Adds Onn Remote support for menu navigation #864

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

rbreaves
Copy link

@rbreaves rbreaves commented Oct 3, 2022

Ready to be merged, brings support on board for Walmart's Onn 4k streamer Part No 100026240.

https://www.walmart.com/ip/onn-Android-TV-4K-UHD-Streaming-Device-with-Voice-Remote-Control-HDMI-Cable/636597403

Also to note - I had to flip the values for b and a from what the default Android TV cfg had, but it seems to be working fine now. Also reset my controllers configs just to make sure I had no active remaps happening on top of the default config.

What the values are now

input_b_btn = "23"
input_a_btn = "4"

Work in progress.. the D-Pad controls appear to work fine, but select and back appear to be non-functional at the moment. Creating this PR however for additional visibility to the problem. Also inclusion may still be warranted as partial support is better than no support and I have only tested it against a single Onn 4k streaming device, I believe there are others.

I have confirmed though that button values appear to match the back button and select buttons, so I am not sure what the actual hang up is. May have to root the device later and do some more digging. Also not sure if adding the vendor and product id to the config file would help any or not, I have not yet pulled that info to add it, but it appears like it isn't needed for it to apply the config still.

On another not I do feel like it is a mistake by the upstream retroarch repo to not push all of these controller configs into the user writable directory by default on Android vs expecting users to figure out where to go to reset the controller config directory.

@rbreaves
Copy link
Author

rbreaves commented Oct 3, 2022

Pulled the rest of the info via dumpsys, non-rooted.

KeyLayoutFile: /vendor/usr/keylayout/Vendor_0957_Product_0005.kl
ConfigurationFile: /vendor/usr/idc/Vendor_0957_Product_0005.idc
Identifier: bus=0x0006, vendor=0x0000, product=0x0000, version=0x0001

Guessing these key values will need to be translated and verified and even then I dunno if it'll be easily fixed or not. Also more keys are defined than what exists on the actual controller.

Vendor_0957_Product_0005.kl

# Copyright (C) 2019 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Key Layout file for B016 Remote.
#

key 116   POWER
key 217   ASSIST

key 103   DPAD_UP
key 108   DPAD_DOWN
key 105   DPAD_LEFT
key 106   DPAD_RIGHT
key 353   DPAD_CENTER

key 158   BACK
key 172   HOME

key 113   VOLUME_MUTE
key 114   VOLUME_DOWN
key 115   VOLUME_UP

key 30		1
key 31		2
key 32		3
key 33		4
key 34		5
key 35		6
key 36		7
key 37		8
key 38		9
key 39		0

key usage 0x000c01BB TV_INPUT
key usage 0x000c022A BOOKMARK
key usage 0x000c0096 SETTINGS
key usage 0x000c0097 NOTIFICATION
key usage 0x000c008D GUIDE
key usage 0x000c0089 TV
key usage 0x000c009C CHANNEL_UP
key usage 0x000c009D CHANNEL_DOWN
key usage 0x000c00CD MEDIA_PLAY_PAUSE
key usage 0x000c00B4 MEDIA_SKIP_BACKWARD
key usage 0x000c00B3 MEDIA_SKIP_FORWARD
key usage 0x000c0226 MEDIA_STOP

key usage 0x000c0077 F10  #YouTube
key usage 0x000c0078 F11  #Netflix
key usage 0x000c0079 F7  #Disney+
key usage 0x000c007A F8  #HBOmax

key usage 0x000c01BD INFO
key usage 0x000c0061 CAPTIONS
key usage 0x000c0185 TV_TELETEXT
key usage 0x000c0069 PROG_RED
key usage 0x000c006A PROG_GREEN
key usage 0x000c006B PROG_BLUE
key usage 0x000c006C PROG_YELLOW

key usage 0x0c0008 F11  #NETFLIX
key usage 0x0c0007 F10  #YOUTUBE
key usage 0x0c0009 F12  #GOOGLE PLAY
key usage 0x0c01A2 F9  #ALL APPS

@RobLoach RobLoach merged commit 948fff0 into libretro:master Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants