Repository navigation
Remap remote buttons from Launcher settings on the TV (no ADB) #4333
sasichalla
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Idea: remap remote buttons on the TV itself, without a computer or a rebuild.
After the stock launcher is disabled, many Google TV remotes have dead buttons (YouTube, Prime Video, gear, profile, Live TV…).
app_keysfixes that, but every change means editingconfig.xmlor a theme and pushing it over ADB, and you first have to find each button's keycode inlogcat/getevent. This adds a Remote buttons row to Launcher settings:TvInputManager), or an action (settings,screensaver,inputs,home,mute,sleep,wifi,ignore).How it works:
InputKeyService/HomeKeyService) hand it the next key, so buttons the firmware sends to the stock launcher as global keys can be captured too. D-pad, OK, Back, Home, volume and power can never be learned, so the remote can't lock you out.app_keysinConfig.load, so they win for the same key; a learned button reuses the built-in entry's key spec, so it overrides in place.Code: https://github.com/sasichalla/cleanyourtv/tree/feature/remote-buttons-screen (one commit on
main: two new classes, small hooks inConfig, the two helpers and Launcher settings, plus adocs/launcher.mdline).Tested on a Hisense 65U88QG (
wutaishan, Google TV 14,UKN6.251123.001.049) withInputKeyService: the owner learned the Tubi button with the real remote, mapped it, and it opened the picked app from Home. Python suite passes;testReleaseUnitTest lintRelease assembleReleasepasses with 0 lint errors.Known gaps, why this is a Discussion and not a PR:
translatable="false");hold:andfront:entries can't be made from the screen yet; not tried withHomeKeyServicealone.Happy to rework it in whatever shape fits: a switch, a slimmer version, or an add-on /
SHOWCASE.mdentry if it doesn't belong in the core.All reactions