Skip to content

Long Press Not Working with Constraints #1603

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

Open
1 task
githubsterer opened this issue Mar 31, 2025 · 10 comments
Open
1 task

Long Press Not Working with Constraints #1603

githubsterer opened this issue Mar 31, 2025 · 10 comments
Assignees
Labels
bug Something isn't working needs triage

Comments

@githubsterer
Copy link

githubsterer commented Mar 31, 2025

Developer TODO (don't remove)

  • update documentation

Describe the bug
Not sure if this has been reported, so apologies in advance if so.

Scenario is as follows.

Both short press and long press volume buttons are constrained when media is playing but only the short press actually works to change the volume whereas the long press does nothing. It does suppress the action but does not rapidly change the volume as expected.

UPDATE: this happens even when the single press is disabled so it's not an issue exclusive to when there are both key maps. It's something with the long press on its own.

@githubsterer githubsterer added bug Something isn't working needs triage labels Mar 31, 2025
@githubsterer
Copy link
Author

UPDATE 2: This is happening even with both volume key maps disabled. It's the app itself causing this on its own because the only way to get the long press to work on the volume keys is to actually pause the entire app.

@jambl3r
Copy link
Collaborator

jambl3r commented Mar 31, 2025

Could you give a specific example to test, and what you expect it to do?

@githubsterer
Copy link
Author

When playing media I expect the long press of a volume key to rapidly change the volume.

I initially discovered this does not work when having a key map triggered by the long press volume key but constrained not to do the action (and thus should allow the volume key to operate as expected) when media is playing. That does not work.

I then disabled the key map entirely expecting at least that to cause the long press volume key to work at expected but that too fails.

Only when I pause the app does the long press volume key work as expected by rapidly changing the volume. In both of the cases above it does not change the volume at all.

@githubsterer
Copy link
Author

Interestingly, I'm only seeing this with the down volume long press. Up volume long press works. Strange.

@githubsterer
Copy link
Author

Oh man this is a weird one, I just figured it out. Give me a sec to write it up.

All I can say is, you couldn't pay enough for this kind of testing! Maybe I'll get a mention in the credits one day for all this :-)

@githubsterer
Copy link
Author

githubsterer commented Mar 31, 2025

Take either volume key, they work the same.

When you assign key maps to all three press types and apply the same no media, no phone constraints to all three, then the long press works as expected to rapidly change the volume.

If you remove the constraints from the double press, then the long press stops working. Once you restore those constraints, the long press resumes working as expected.

What's strange is that when it doesn't work, it performs neither function. It does not do the action and it does not adjust the volume.

@Dani3I
Copy link

Dani3I commented Apr 20, 2025

Idk if it is exactly the same bug, but I installed the app (and allowed for accessibility options) on my android tv and volume up/down buttons always increase volume by one increment. So when I click volume button it works as expected (increase volume by one) but when I hold key it also increases volume only by one - which is not desired (it should continue increasing volume until I stop holding volume key - this is how it works when app is uninstalled).
AND I only installed app and allowed for accessibility option; I haven't added any mappings to buttons or anything else.

@jambl3r
Copy link
Collaborator

jambl3r commented Apr 20, 2025

@Dani3I - This is intended behaviour because you have not told Key Mapper that you want the action to repeat when you hold down the key.

You can achieve what you're looking for by turning on Repeat in the action settings. The app defaults are pretty good as-is.

Screenshot_20250420-204841.png

@Dani3I
Copy link

Dani3I commented Apr 21, 2025

@Dani3I - This is intended behaviour because you have not told Key Mapper that you want the action to repeat when you hold down the key.

You can achieve what you're looking for by turning on Repeat in the action settings. The app defaults are pretty good as-is.

Screenshot_20250420-204841.png

Should this application not work in such a way that when nothing is set, then all buttons work as if the application was not there?

@jambl3r
Copy link
Collaborator

jambl3r commented Apr 21, 2025

Probably to some degree. We've made repeat the default for the next update, see #1657

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

4 participants