Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Onyx Boox

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2022, 12:18 PM   #16
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
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.
Renate is offline   Reply With Quote
Old 01-18-2022, 12:24 PM   #17
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
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.
llinfeng is offline   Reply With Quote
Advert
Old 01-18-2022, 12:45 PM   #18
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
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
What does the first line say, "Volume key shortcut"? Is it gray? Can you select something?
Renate is offline   Reply With Quote
Old 01-18-2022, 01:53 PM   #19
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
Under Accessibility, the first line reads:
Quote:
Volume key shortcut
No service selected
Indeed, I can tap on it, which prompts me to turn on "Volume key shortcut". Here are a few screenshots:
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.
llinfeng is offline   Reply With Quote
Old 01-18-2022, 02:26 PM   #20
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
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
and see a direct correlation between pressing a button and something spitting out I don't know how I can do any more.
Renate is offline   Reply With Quote
Advert
Old 01-18-2022, 05:14 PM   #21
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
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:
  1. After pressing the buttons on the magnetic cover for Nova Air, I shall see the following event:
    Code:
    01-18 16:56:28.193  1286  2707 D MediaSessionService: dispatchVolumeKeyEvent, pkg=com.android.settings, opPkg=com.android.settings, pid=7509, uid=1000, asSystem=true, event=KeyEvent { action=ACTION_UP, keyCode=KEYCODE_VOLUME_UP, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=2335593, downTime=2335593, deviceId=-2023406815, source=0x12345678, displayId=-1 }, stream=-2147483648, musicOnly=false
  2. When I toggle the "Finger Touch" function, I found the following patterns:
    Code:
    01-18 12:23:59.437  1436  1436 I TouchInteractionService: onReceive Intent { act=onyx.action.DO_NOT_INTERCEPT_GESTURE flg=0x1000010 }   flags 0
    
    01-18 16:54:08.631  1436  1436 W TouchInteractionService: Intercept gesture TP disable

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?
llinfeng is offline   Reply With Quote
Old 01-18-2022, 08:03 PM   #22
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
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
Renate is offline   Reply With Quote
Old 01-18-2022, 08:28 PM   #23
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
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:/ $
Both buttons on the cover are still working as volume rockers.
llinfeng is offline   Reply With Quote
Old 01-19-2022, 05:59 AM   #24
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
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.
Renate is offline   Reply With Quote
Old 01-19-2022, 03:08 PM   #25
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,316
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by llinfeng View Post
[*] When I toggle the "Finger Touch" function, I found the following patterns:
Code:
01-18 12:23:59.437  1436  1436 I TouchInteractionService: onReceive Intent { act=onyx.action.DO_NOT_INTERCEPT_GESTURE flg=0x1000010 }   flags 0

01-18 16:54:08.631  1436  1436 W TouchInteractionService: Intercept gesture TP disable
can I assign a dedicated key to disable/enable "Finger Touch" by editing /system/usr/keylayout?
Nope.

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
pazos is offline   Reply With Quote
Old 01-19-2022, 03:28 PM   #26
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
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.
llinfeng is offline   Reply With Quote
Old 01-19-2022, 04:02 PM   #27
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
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.
pazos is offline   Reply With Quote
Old 01-19-2022, 04:59 PM   #28
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
Posts: 38
Karma: 58
Join Date: Jan 2019
Device: Kobo, Kindles, Sony DPTs, QQ-Read
Thanks a lot for the pointer.
llinfeng is offline   Reply With Quote
Old 01-20-2022, 12:26 PM   #29
Renate
Wizard
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
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
And if you don't like it, put it back to zero.

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.
Renate is offline   Reply With Quote
Old 01-20-2022, 12:54 PM   #30
llinfeng
Enthusiast
llinfeng is on a distinguished road
 
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.)
llinfeng is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 03:47 PM.


MobileRead.com is a privately owned, operated and funded community.