KeyMapper icon indicating copy to clipboard operation
KeyMapper copied to clipboard

Volume keys still change volume when screen is off

Open sconim opened this issue 3 years ago • 4 comments

Screenshot_20220203-201304_Key Mapper Screenshot_20220203-201251_Key Mapper 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

Discord message link/email recipient

Describe the bug Volume keys (long press) were remapped for "next track" (volume up) and respectively "previous track" (volume down).

Do not remap was NOT enabled in menu (three dots).

When screen is ON (everything works as expected):

  1. Long press Volume up triggers Next Track without altering volume.
  2. Long press Volume down triggers Previous Track without altering volume.

When screen is OFF: 3. Long press Volume up triggers Next Track however, volume increases with each press. 2. Long press Volume down triggers Previous Track however, volume decreases with each press.

To Reproduce Steps to reproduce the behavior:

Upload a backup of your keymaps. Follow the guide here.

Expected behavior Volume should NOT change.

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [Samsung S10, SM-G980F]
  • Android version: [Android 10]

Additional context Add any other context about the problem here.

sconim avatar Feb 04 '22 01:02 sconim

Hi, this is a known issue. Unfortunately, Android doesn't allow apps to detect buttons when the screen is off. There is a limited and janky workaround for this that I have described here https://github.com/keymapperorg/KeyMapper/issues/501

sds100 avatar Feb 06 '22 16:02 sds100

@sds100

I've faced this problem too.

I've found that your fix/workaround https://github.com/keymapperorg/KeyMapper/commit/8af2330c473fa30b3aa2c6ba15f3a70ac26a468c, unfortunately, doesn't belong to any branch on this repository.

Could you please expose this fix/workaround as a toggle/checkbox in the UI like Button Mapper does? 🙏

See "Suppress volume change":

button-mapper-screenshot

FluorescentHallucinogen avatar Nov 22 '22 09:11 FluorescentHallucinogen

@sds100 Could you please reopen this issue?

FluorescentHallucinogen avatar Dec 11 '22 16:12 FluorescentHallucinogen

Might be solvable with #1394

jambl3r avatar May 15 '25 21:05 jambl3r

will be fixed by pro mode

jambl3r avatar Oct 25 '25 10:10 jambl3r