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

Enable powerTorch with screen on #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

1 participant