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

Bixby/Menu and Search button support with screen off #955

Closed
4 tasks done
t184256 opened this issue Mar 23, 2022 · 23 comments
Closed
4 tasks done

Bixby/Menu and Search button support with screen off #955

t184256 opened this issue Mar 23, 2022 · 23 comments
Assignees
Labels
enhancement New feature or request

Comments

@t184256
Copy link

t184256 commented Mar 23, 2022

These are the buttons which can be detected when the screen is off. Let the developer know about any buttons you would also like to be supported.

Volume Up
Volume Down
Headset button

My device (Samsung S10e) has that Bixby button, detectable as Menu. Could it be supported for remapping with the screen off?

Developer TODO (don't remove)

  • create new branch. put issue number at start of name
  • update documentation
  • squash and merge
  • delete branch
@t184256 t184256 added the enhancement New feature or request label Mar 23, 2022
@sds100
Copy link
Collaborator

sds100 commented Apr 10, 2022

Hi, yeah it can be! The screen-off detection is very janky though and only works if you are rooted. No guarantee that it will work well on your device.

@t184256
Copy link
Author

t184256 commented Apr 10, 2022

Mine's rooted, so I'm not deterred =) I can test a build if you're willing to provide one.

@ngwebb1
Copy link

ngwebb1 commented Apr 19, 2022

My S9+ is rooted as well. Thanks so much for adding the Bixby button to this list. (No rush at all! I'll make do for now.) I'll also be happy to test a build, if you'd like.

@iFUCKINGHATEcomputers
Copy link

This thread seems to be the most relevant for me to ask - what about supporting the Google Assistant button when the screen is off? KeyMapper labels it as Search on my Moto G 5G.

@sds100 sds100 changed the title Bixby/Menu button support with screen off Bixby/Menu and Search button support with screen off Apr 29, 2022
@sds100
Copy link
Collaborator

sds100 commented Apr 29, 2022

@t184256 @BluestarZero can you please try this apk :) keymapper-2.5.0-alpha-debug.zip

@sds100
Copy link
Collaborator

sds100 commented Apr 29, 2022

This thread seems to be the most relevant for me to ask - what about supporting the Google Assistant button when the screen is off? KeyMapper labels it as Search on my Moto G 5G.

I'll add this as well!

@sds100
Copy link
Collaborator

sds100 commented Apr 29, 2022

@iFUCKINGHATEcomputers can you try this apk for the search button :) keymapper-2.5.0-alpha-debug.zip

@ngwebb1
Copy link

ngwebb1 commented Apr 29, 2022

@t184256 @BluestarZero can you please try this apk :) keymapper-2.5.0-alpha-debug.zip

Thanks for this alpha build, but i couldn't get the Bixby (Menu) button to work properly. Mappings seem to work fine when the screen is on, but not at all whenthe screen is off and phone is locked, even when I added in the "Screen is off" constraint and checked the "Detect when screen is off" checkbox. I wonder if @t184256 is having the same issue.

@t184256
Copy link
Author

t184256 commented Apr 29, 2022

Didn't work, sadly. Volume down works fine with screen off, Menu button with same conf doesn't, nothing observed in the logs related to me pressing it.

@sds100
Copy link
Collaborator

sds100 commented Apr 29, 2022

Didn't work, sadly. Volume down works fine with screen off, Menu button with same conf doesn't, nothing observed in the logs related to me pressing it.

Okay, can you two run the adb getevent command and press the Bixby button and show me the output?

@ngwebb1
Copy link

ngwebb1 commented Apr 29, 2022

Here's what my output looks like:

star2lte:/ $ getevent
add device 1: /dev/input/event3
name: "ssp_context"
add device 2: /dev/input/event8
name: "certify_hall"
add device 3: /dev/input/event2
name: "grip_sensor"
add device 4: /dev/input/event1
name: "sec_touchpad"
add device 5: /dev/input/event4
name: "hrm_sensor"
add device 6: /dev/input/event0
name: "sec_touchscreen"
add device 7: /dev/input/event6
name: "gpio_keys"
add device 8: /dev/input/event7
name: "hall"
add device 9: /dev/input/event5
name: "Headset"
Bixby button to play/pause media (screen on):
/dev/input/event6: 0001 02bf 00000001
/dev/input/event6: 0000 0000 00000000
/dev/input/event6: 0001 02bf 00000000
/dev/input/event6: 0000 0000 00000000
Power button to turn off screen and lock device:
/dev/input/event6: 0001 0074 00000001
/dev/input/event6: 0000 0000 00000000
/dev/input/event6: 0001 0074 00000000
/dev/input/event6: 0000 0000 00000000
Bixby button to play/pause media (screen off) [this does nothing]:
/dev/input/event6: 0001 02bf 00000001
/dev/input/event6: 0000 0000 00000000
/dev/input/event6: 0001 02bf 00000000
/dev/input/event6: 0000 0000 00000000

@sds100
Copy link
Collaborator

sds100 commented Apr 29, 2022

@BluestarZero sorry, can you do getevent -lq

@ngwebb1
Copy link

ngwebb1 commented Apr 29, 2022

No problem. This looks more understandable:

star2lte:/ $ getevent -lq
Bixby button to play/pause media (screen on):
/dev/input/event6: EV_KEY 02bf DOWN
/dev/input/event6: EV_SYN SYN_REPORT 00000000
/dev/input/event6: EV_KEY 02bf UP
/dev/input/event6: EV_SYN SYN_REPORT 00000000
Power button to turn screen off & lock device:
/dev/input/event6: EV_KEY KEY_POWER DOWN
/dev/input/event6: EV_SYN SYN_REPORT 00000000
/dev/input/event6: EV_KEY KEY_POWER UP
/dev/input/event6: EV_SYN SYN_REPORT 00000000
Bixby button to play/pause media (screen off) [this does nothing]:
/dev/input/event6: EV_KEY 02bf DOWN
/dev/input/event6: EV_SYN SYN_REPORT 00000000
/dev/input/event6: EV_KEY 02bf UP
/dev/input/event6: EV_SYN SYN_REPORT 00000000

@sds100
Copy link
Collaborator

sds100 commented Apr 29, 2022

try this :) keymapper-2.5.0-alpha-debug.zip

@ngwebb1
Copy link

ngwebb1 commented Apr 29, 2022

MAN, you work fast. I'll give this one a try!

@sds100
Copy link
Collaborator

sds100 commented Apr 29, 2022

MAN, you work fast. I'll give this one a try!

Haha, this issue is just changing one line 😄

@t184256
Copy link
Author

t184256 commented Apr 29, 2022

On the go, but that one seems to work in general with just a ~second window of not working immediately after I lock the screen.

@sds100
Copy link
Collaborator

sds100 commented Apr 29, 2022

On the go, but that one seems to work in general with just a ~second window of not working immediately after I lock the screen.

Yeah, this is an issue with this method. It is super janky. I'm not sure what I can do to improve it. I would have to make an Xposed module to be able to do this properly.

@t184256
Copy link
Author

t184256 commented Apr 29, 2022

Well, it's infinitely more useful than a button that just does nothing when I operate my device from the pocket, so I'm happy.

@sds100
Copy link
Collaborator

sds100 commented Apr 29, 2022

Well, it's infinitely more useful than a button that just does nothing when I operate my device from the pocket, so I'm happy.

Cool, I'll merge this request then

@sds100
Copy link
Collaborator

sds100 commented Apr 29, 2022

implemented

@sds100 sds100 closed this as completed Apr 29, 2022
@ngwebb1
Copy link

ngwebb1 commented Apr 29, 2022

You did it! It seems to work now! Although, sometimes, I have to press the button when once before the map actually works.

But for now, it's working properly. I'll have to daily drive for a while to get a better feel of my maps. Thank you so much!

@iFUCKINGHATEcomputers
Copy link

iFUCKINGHATEcomputers commented May 3, 2022

Ayy, the Search button works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants