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

Remove all long-press actions from remote.xml #10186

Merged
merged 1 commit into from
Jul 30, 2016
Merged

Remove all long-press actions from remote.xml #10186

merged 1 commit into from
Jul 30, 2016

Conversation

NedScott
Copy link
Contributor

It appears that long-press does not behave well with input devices that use remote.xml (MCE, non-android CEC, etc). This removes those actions for now.

It appears that long-press does not behave well with input devices that use remote.xml (MCE, non-android CEC, etc). This removes those actions for now.
@FernetMenta FernetMenta merged commit 81f9cc0 into xbmc:master Jul 30, 2016
@MilhouseVH
Copy link
Contributor

MilhouseVH commented Jul 30, 2016

@ned: I just ran some tests, and I added the following mappings to a custom remote.xml on LibreELEC RPi2 with Ortek VRC-1100 remote:

<play>Right</play>
<play mod="longpress">Down</play>

Effect: Pressing Play (long or short) results in a DOWN action.

And then I replaced the above with:

<play mod="longpress">Down</play>
<play>Right</play>

Effect: Pressing Play (long or short) results in a RIGHT action.

So it simply looks like the last mapping always overrides the first regardless of modifier, when instead there should be two distinct mappings (one for longpress, the other for a normal "shortpress"). It does appear that remote.xml (<remote>) doesn't support the "longpress" modifier, although I'm sure it can't be that simple as presumably it is working for whatever remote you have.

I can't see any reason why "longpress" shouldn't work with MCE (and possibly other) remotes - the Ortek VRC-1100 MCE remote I have generates two distinct KEY_DOWN/KEY_UP events for each button press, and presumably it's the time interval between the KEY_DOWN/KEY_UP events that determines if it's a short or long press.

@MilhouseVH
Copy link
Contributor

I could be reading the source code incorrectly, but in ButtonTranslator.cpp the "longpress" modifier seems to be supported only for <keyboard> mappings: https://github.com/xbmc/xbmc/blob/master/xbmc/input/ButtonTranslator.cpp#L1361-L1418

There doesn't appear to be any modifier support (longpress or otherwise) for <remote> mappings: https://github.com/xbmc/xbmc/blob/master/xbmc/input/ButtonTranslator.cpp#L1250-L1325

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.

None yet

4 participants