Skip to content

Conversation

@mustanggb
Copy link

I would like powerTorch to also work with the screen on.

The difficult part seems to be still allowing the combo/multi button long presses to function.

Obviously with the combo's you try to press the buttons at the same time, but inevitably one button is pressed a fraction before the other.

This code allows the volumeUp+power (power menu) and volumeDown+power (screenshot) to work correctly.

But doesn't detect power+volumeUp and power+volumeDown, and instead toggles the torch.

Any hints on how to do this better would be appreciated.

I tried adding InputMethodService.onKeyDown() and InputMethodService.onKeyUp() but they didn't have any noticeable effect.

Also, if you were to accept such a feature addition what would be the best way to add it; would it be best to change the existing powerTorch, or leave it alone and add this as a new option?

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.

1 participant