Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
108.84k stars 10.47k forks source link

Add support for colored buttons #2162

Open CarlottaTagliaro opened 3 years ago

CarlottaTagliaro commented 3 years ago

Is there the possibility to add the support of binding colored buttons to this interface? I think it might be the only feature missing to allow interaction with HbbTV application remotely

rom1v commented 3 years ago

I don't know what you mean by "colored button".

Might be related:

CarlottaTagliaro commented 3 years ago

Sorry, I should have mentioned that I am working on an Android Smart TV.

The remote of Smart TVs (and I think also standard ones) have the possibility to press the red/green/blue/yellow buttons to enable additional features. Would this be possible with scrcpy? The other commands work well so I think only the right binding is missing but I am new to Android's world and I don't know where to look at

rom1v commented 3 years ago

First, you must find the keycode associated to these buttons, ie the KEYCODE_* values listed here: https://developer.android.com/reference/android/view/KeyEvent.html

To test, execute (here for KEYCODE_HOME):

adb shell input keyevent HOME