virresh / matvt

Virtual Mouse for Android TV that can be controlled via remote itself.
GNU General Public License v3.0
229 stars 37 forks source link

Add alternate boss key operation without long press? #16

Closed jeffs555 closed 2 years ago

jeffs555 commented 3 years ago

Firstly, I am trying this with Tanix TX6 android TV box and it is working great with the Tanix remote. Thanks very much for making the program available.

However, I want to use it with HDMI-CEC control from a Samsung TV using the TV remote. It is somewhat working in that I can map a new keycode in MATVT and it will toggle scroll mode enabled/disabled if already in mouse mode. Direction buttons will move the mouse. However it can't send a long press to toggle between mouse mode and D-pad mode. All the keycodes from the Samsung TV HDMI-CEC send a make code followed immediately by a break code.

If you do a future version, it would be nice if you could allow operation without needing the long press. If you had an optional setting that would just toggle between mouse mode, scroll mode, and D-pad mode with each press of the key it would be great. The mouse speed acceleration doesn't work over CEC, because the Samsung CEC is constantly sending make/breaks for the direction keys, so the mouse is somewhat slow, but that is OK. Mainly need a way to change between mouse mode and D-pad mode without the long press.

Thanks again for sharing this great program.

virresh commented 3 years ago

Thanks @jeffs555 for trying the app and reporting enhancements.

allow operation without needing the long press

Sure, Will keep it in mind and add when I get time. This is already supported on Android TVs with a full TV remote, so I hope it won't be difficult to make it customizable.

In the meanwhile, do you know if the Samsung TV remote can toggle info keycode in Tanix Tx6? The info button on a normal Android TV does the exact functionality (i.e toggle mouse mode and dpad mode without long press). Do let me know if the info button approach works / is feasible.

jeffs555 commented 3 years ago

The Samsung TV remote does have an info button, but when pressed it passes a keycode 56 over HDMI-CEC to the Tanix box. I couldn't find any button on the Samsung TV remote or on the Tanix remote that generates the info keycode 165 at the Tanix box. Don't think that Tanix has a full size remote for any of their boxes.

Thanks again.

virresh commented 3 years ago

okay, no issues. Since bossKey needs to be able to now toggle between all three (dpad mode, mouse mode and scroll mode), it'll probably be not as friendly as the long press for enable / disable and short press for toggle

I'm keeping it as a three way toggle, cycling in the order: Dpad mode => Mouse Mode => Scroll Mode on every button press

The above functionality can be enabled via a checkbox in settings GUI from MATVT v1.04 onwards (download from https://github.com/virresh/matvt/releases/tag/v1.0.4 )

Please try and let me know if this solves your use case

virresh commented 2 years ago

@jeffs555 I'm closing this issue. Please feel free to re-open / comment in case the provided functionality doesn't serve your purpose.