keymapperorg / KeyMapper

An Android app that change what the buttons do on your devices!
http://docs.keymapper.club
GNU General Public License v3.0
1.06k stars 153 forks source link

"Trigger when screen off" button request: CAT S22 Flip orange side button #1277

Open 70mg opened 1 month ago

70mg commented 1 month ago

Developer TODO (don't remove)

The CAT S22 Flip* has an orange button on its left side. KeyMapper detects this button as unknown keycode 0 (This device).

Actions can be triggered with this button, but it does not work with the CAT S22 Flip closed. The documentation for Trigger when screen off advises to let the developer know any buttons one would like supported, and requests the output of adb shell getevent -lq (below). It would be great if this button was supported because then it could be mapped to, for example, play/pause. Paired with the default OS volume and song skipping capabilities of the volume buttons, and the CAT S22 Flip's external screen, this would turn the CAT S22 Flip into a nifty MP3 player when closed!

Note: This issue relates to #1276. However, it is pointless assigning the other button mentioned in that issue to work whilst the device is closed because the other button is not accessible when the closed.

adb shell getevent -lq output: /dev/input/event1: EV_MSC MSC_SCAN 00000023 /dev/input/event1: EV_KEY KEY_NUMERIC_B DOWN /dev/input/event1: EV_SYN SYN_REPORT 00000000 /dev/input/event1: EV_MSC MSC_SCAN 00000023 /dev/input/event1: EV_KEY KEY_NUMERIC_B UP /dev/input/event1: EV_SYN SYN_REPORT 00000000

I appreciate not many people will have this device to hand, so I am of course on hand to help test or provide any additional information.

*The CAT S22 Flip is sold with a version of Android Go which comes with software for mapping these buttons. However, this is unavailable to users running a custom ROM on the device, making KeyMapper a great alternative. The device has become fairly popular among people wanting a "dumbphone" experience, but not wanting to ditch Android. A popular reason for wanting to install a custom ROM (e.g. LineageOS) is to de-google the device. KeyMapper is currently being recommended on the most popular and useful forum post on how to install LineageOS on the CAT S22 Flip.

p.s. KeyMapper is great, thank you!