KeyMapper
KeyMapper copied to clipboard
sequence trigger and double press trigger on same key imitates volume incorrectly
Developer TODO (don't remove)
- [ ] create new branch. put issue number at start of name if not a very quick fix.
- [ ] write tests. put issue number in comment
- [ ] update documentation
- [ ] squash and merge
- [ ] delete branch
Describe the bug When actions are triggered with volume buttons that are not remapped (single or double-press), the volume button continues to adjust during triggering. I cannot use those volume triggers with the "do not remap" box off, because doing do prevents me from adjusting the volume at all.
To Reproduce Create a new keymap. Record trigger and use a volume button. Select short press or double press, and in the menu of the recorded volume triggers, select do not remap. Then add any action and save.
Upload a backup of your keymaps. [https://drive.google.com/file/d/1-OPj_8veN1FAfioh1y5HhG0bE4eHHAQw/view?usp=drivesdk]
Expected behavior When using the volume button triggers, if the trigger sequence is not completed before the timeout, the volume should be adjusted accordingly (corresponding in sequence to the volume buttons pressed should there be more than one recorded volume button trigger). If the action is successfully triggered, volume button adjustments should be disregarded (in other words, the volume must not be adjusted when the action is being executed). If not using long press options in triggers at all, when long pressing either volume button, the volume must increase or decrease accordingly (this is unachievable when do not remap is off on any keymap)
Screenshots Not applicable
Smartphone:
- Device: OnePlus Nord N10 5G
- Android version: Android 12
Additional context Not applicable
Hi, is #683 or #754 part of your issue? I think I have seen this before, and its not common, but we see it happen every now and then.
I want to say I made an issue for this as well in the past, but I can't seem to find the issue...
@Dondrejohnson5 how come you have chosen the "do not remap" option? It sounds like it is behaving as expected, you are wanting the press of the volume buttons do your action without remapping the volume buttons to only do the actions instead of changing volume.
I would have wanted to do both change the volume and execute actions. If "do not remap" is off, changing volume is impossible. So I have chosen "do not remap" in hopes of being able to do both. I can, however, the volume changes at inconvenient times when I'm trying to execute my actions. I would want the app to differentiate between when I'm trying to change volume (short press, long press, etc) and when I'm trying to execute actions, not one or the other
Apologies if my intentions weren't clear in the op
Ah, I understand but how is Key Mapper supposed to know you want to perform an action vs change the volume? You need to tell it that somehow
Well i did try to explain it in the expected behavior section in the op. If i press the button and nothing executes before the timeout, change the volume after the timeout has been reached. If i do execute an action before timeout, disregard the volume. For long pressing the buttons, the same should apply somehow, especially if none of the actions require me to long press the buttons. In which case, the volume must be adjusted as I long press up or down
Oh okay, so you want the actions to be triggered when you release the buttons in the trigger?
Edit: I'm still confused. 😂 Can you walk through an example step by step in detail with reference to time and up/down key events
The mapper already does that. Maybe when triggering actions before releasing the buttons may be the way to go.
I will try my best to explain this: Double press: as you see, i have double press volume down to rotate device orientation. The default double press timeout is 300 ms. If i had pressed the volume button once, then after 300ms has passed, the volume will go down one. If I long press the button instead of pressing it once, the volume decreases. However, if i do press the volume button twice, the action executes (before i release the button on the second press), and after the 300ms window the volume remains unaffected. Although, if I long press on the second button press, after 300ms the action executes and the volume will decrease Long press: As stated above, you do make a good point concerning long presses. Say I have the trigger to long press down instead of double press down for my rotation action. The default here is 500ms. As I continue to long press the button for 500ms, the action will execute, but if i release the button right after the action is completed, the volume should not be affected. But if i do continue to long press after 500ms, the volume will decrease after the action is completed. The current problem in the app here is that the volume decreases during the 500ms threshold.
My bad, I accidentally closed my thread
Ahhh, I think I see the issue now with your key maps. When you do your sequence triggers the volume still changes. You do not want that to happen? This looks like a bug
Basically 😅
Hello dev. I'm not asking for an eta here, I'm just wondering if the bug i mentioned is being worked on. None of the boxes in the op have been checked yet, so I'm a bit concerned
@sds100 hello?