|
|
Thread Tools | Search this Thread |
01-18-2022, 12:18 PM | #16 |
Wizard
Posts: 2,931
Karma: 12021497
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
Nah, it wasn't in KCB. It was in services.jar, also on my copy. It's in com.android.server.accessibility.MotionEventInject or
It looks like the buttons fake a gesture, which gets translated into VolUp/VolDn??? Go to your settings for Gestures and see if any of them are VolUp/VolDn. Change them to something and see if it makes a difference. Uh-oh, I looked at mine, that could be it. It's sliding up and down the left edge. |
01-18-2022, 12:24 PM | #17 |
Enthusiast
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
|
In Gesture setting, I changed what sliding up/down at the left edge does. Still, the volume buttons on the cover ended up changing volumes when they are pressed.
|
Advert | |
|
01-18-2022, 12:45 PM | #18 |
Wizard
Posts: 2,931
Karma: 12021497
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
Hmm...
Go to Android (stock) Settings > Accessibility: Code:
$ am start -n com.android.settings/.Settings |
01-18-2022, 01:53 PM | #19 | |
Enthusiast
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
|
Under Accessibility, the first line reads:
Quote:
1. Screenshot 1 - Is the color for "Volume key shortcut" gray? Well, not really? 2. Screenshot 2 - These are options I see after tapping on the "Volume key shortcut" entry. |
|
01-18-2022, 02:26 PM | #20 |
Wizard
Posts: 2,931
Karma: 12021497
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
OMG, you've got so much stuff going on there.
I still think that those buttons are coming through the accessibilty stuff that I mentioned. It's just too complicated to troubleshoot by remote control. Unless you can capture a logcat... Code:
C:\>adb logcat |
Advert | |
|
01-18-2022, 05:14 PM | #21 |
Enthusiast
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
|
Thank you for all the detailed instructions up to this point. Here are two sets of logcat outputs, stored on Dropbox:
Then, to talk about the patterns, I am not sure what to look for exactly. Solely by how often something is logged, here is my take:
How to make use of these things? As a bit of a sidenote, can I assign a dedicated key to disable/enable "Finger Touch" by editing /system/usr/keylayout? |
01-18-2022, 08:03 PM | #22 |
Wizard
Posts: 2,931
Karma: 12021497
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
I may have it (the side switches). Do this:
Code:
$ settings put system switch_key 1 |
01-18-2022, 08:28 PM | #23 |
Enthusiast
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
|
Sorry, what to expect after running the following in abd shell?
Code:
NovaAir:/ $ settings put system switch_key 1 NovaAir:/ $ |
01-19-2022, 05:59 AM | #24 |
Wizard
Posts: 2,931
Karma: 12021497
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
Hmm... That's interesting. That settings does affect a bit of code that decides whether "pageVolUp" gets mapped to PgUp or VolUp. I guess that it was already resolved or it doesn't go through there.
|
01-19-2022, 03:08 PM | #25 | |
cosiñeiro
Posts: 1,316
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Quote:
When you click the "finger touch" quick pane an intent is generated, as you can see in logcat. You can use an app that uses the accesibility framework, catches a defined key press and emits the same intent you see on your log. That's it "onyx.action.DO_NOT_INTERCEPT_GESTURE" You need to know if the flags change based on current state (enabled/disabled) or they are the same on both and the service that catches the intent just flips current state. You can do that pressing the "finger touch" thingy a few times and watching at the log. Do you see the same flags?. An example of an app that uses the accesibility framework to map keys to other things is https://github.com/sds100/KeyMapper. They have wonderful docs available following the links in the link |
|
01-19-2022, 03:28 PM | #26 |
Enthusiast
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
|
Hi pazos,
Thanks for taking a look at the previous posts and suggesting KeyMapper as a working demo. Frankly speaking, I don't even know what are "flags" per the logcat content Just to clarify what to expect - at the end of the day, to map a DPAD key to flip the "Finger Touch" setting, I should write myself a standalone Android App. And, to do so, I can refer to the implementation for KeyMapper. [Upon quickly looking into KeyMapper, it said it cannot remap buttons on DPAD ...] RE: the patterns - I did flip it multiple times in this logfile, and those two lines are showing up sequentially as I flip the setting. Though, there are many lines between those two text markers that I don't fully understand. |
01-19-2022, 04:02 PM | #27 |
cosiñeiro
Posts: 1,316
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Certain keys cannot be remapped (ie: power button). For those that can be remapped you can use the suggested app directly. Writting your own app to do the same is a billion times harder than reading the manual from one that's already implemented, documented and in good shape.
I suggested the intent based on your previous log, but there're no traces on your full log that the intent was called more than once. Sadly these kind of things require time and some knowledge. You can try to start the intent from adb with "am" and see it the setting flips it state. There're plenty of online tutorials of how to send intents using the shell. |
01-19-2022, 04:59 PM | #28 |
Enthusiast
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
|
Thanks a lot for the pointer.
|
01-20-2022, 12:26 PM | #29 |
Wizard
Posts: 2,931
Karma: 12021497
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
Try this:
Code:
$ settings put global key_custom_side_key_short_press_enable 1 I believe it will make the buttons scroll, but possibly in a screwy manner and not working like normal PgUp/PgDn. Edit: And if you're still not happy, give me a copy of your boot.img so I can check the dtb. Last edited by Renate; 01-20-2022 at 12:39 PM. |
01-20-2022, 12:54 PM | #30 |
Enthusiast
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
|
Thanks for the comment that I can undo the setting by setting the thing back to 0. Unfortunately, with the suggested setting, the two buttons are not doing anything. I have only tried OneNote and Kindle.
Though, getting boot.img seems to be a bit demanding, per this post. RE: being happy - I'm glad to learn a lot about adb, especially getting to know the correct spelling And, I don't end using the magnetic cover too much anyways. I think the OP of this thread can take over from where we are now, well, if there is a burning need to remap the two keys on the magnetic cover. Practically, for flipping pages, I use a Bluetooth clicker. (Logitech Spotlight feels good, but only have two functional buttons. And, Boox sells a black page-turner as well.) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to remap nova air's "volume buttons" to page up / down | arooni | Onyx Boox | 5 | 01-06-2022 07:56 PM |
How is the new page scrolling mode of Nova 2? | ilyasson | Onyx Boox | 2 | 10-05-2020 02:11 AM |
How to bookmark a page w Nova Pro? | bsabiston | Onyx Boox | 0 | 02-04-2020 12:04 AM |
REMAP previous page button to next page | rathaniel | Kindle Developer's Corner | 17 | 03-25-2013 03:02 AM |
Feature request: Remap spacebar to turn page forward | steve3 | Kindle Developer's Corner | 11 | 01-03-2011 01:13 PM |