Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 01-01-2021, 02:50 PM   #1
arooni
Addict
arooni began at the beginning.
 
Posts: 230
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
Bluetooth wireless presenter + android (or kindle paperwhite + koreader compatibility

In my quest to be ever lazier, I purchased a tablet bedside arm holder which lets me read & browse from just my bluetooth mouse & keyboard. i hope this also helps me read more books due to ease of use.

anyways i'm wondering if anyone has purchased those bluetooth wireless presenters that just have the function for next/previous page and hooked them up to either a

1) android 10 tablet
2) a jailbroken paperwhite running koreader

if so, how?

and which presenter did you get?

my laziness thanks you in advance.
arooni is offline   Reply With Quote
Old 01-01-2021, 03:15 PM   #2
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: 747
Karma: 1224327
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by arooni View Post
In my quest to be ever lazier, I purchased a tablet bedside arm holder which lets me read & browse from just my bluetooth mouse & keyboard. i hope this also helps me read more books due to ease of use.

anyways i'm wondering if anyone has purchased those bluetooth wireless presenters that just have the function for next/previous page and hooked them up to either a

1) android 10 tablet
2) a jailbroken paperwhite running koreader

if so, how?

and which presenter did you get?

my laziness thanks you in advance.
In both cases the answer is the same:

Bluetooth human interface devices (HID) are supported by the platform/OS, not by specific programs.

Bluetooh HID are just "limited keyboards" that emit a key event with a given key code. For platforms that support Bluetooth HID, like android, it doesn't matter the key codes it emits, because KOReader has extensive support for key mappings

You just need to know which key codes are generated by your device. For the specific case of android see this comment. On other platforms it is easier as there're easier ways to retrieve logs.

About Kindles, Pocketbooks... Even if the platform has support for bluetooth devices and some devices do work on the stock reader there's no other answer than try it yourself. As these kind of embedded devices might not follow standards.
pazos is offline   Reply With Quote
Old 01-03-2021, 09:55 PM   #3
arooni
Addict
arooni began at the beginning.
 
Posts: 230
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
Somewhat related, unrelated,

has anyone got the Samsung s6 pen to work with advancing pages? Seems like an awesome use case, but it seems to be mapped to samsung controls like next track/previous track etc and not sure it can be captured
arooni is offline   Reply With Quote
Old 01-04-2021, 10:30 AM   #4
arooni
Addict
arooni began at the beginning.
 
Posts: 230
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
I have a galaxy tab s6.

Use case is that I can use an ebook reader app like moon reader + or koreader and have more of the spen gestures map to features.

luckily enough i've learned that the pen up and down actions are able to go to next and previous pages in both koreader and moon reader... but it'd be nice to be able to grab more keycodes from it other than these two. it seems like it's the only key codes that can be captured by apps. has anyone succeeded in mapping more keycodes/functions from the spen?

also have you found your spen air gestures useful in ways other than controlling music? many thanks!
arooni is offline   Reply With Quote
Old 01-04-2021, 10:50 AM   #5
arooni
Addict
arooni began at the beginning.
 
Posts: 230
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
Great tip!

Looks like the basic next page are automatically supported, but would love to be able to map the spen to more features. Unfortunately I couldn't seem to make any other gestures generate key codes in koreader

Code:
01-04 08:07:00.537  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 0, time: 1609769220.537161
01-04 08:07:02.465  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 1, time: 1609769222.464910
01-04 08:07:02.476  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 0, time: 1609769222.476735
01-04 08:07:03.580  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 1, time: 1609769223.580405
01-04 08:07:03.594  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 0, time: 1609769223.594441
01-04 08:07:05.378  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 1, time: 1609769225.378116
01-04 08:07:05.391  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 0, time: 1609769225.390974
01-04 08:07:19.366  3594  4345 V KOReader:  key event => type: 1, code: 25(LPgFwd), value: 1, time: 1609769239.366025
01-04 08:07:19.404  3594  4345 V KOReader:  key event => type: 1, code: 25(LPgFwd), value: 0, time: 1609769239.404858
01-04 08:07:22.064  3594  4345 V KOReader:  key event => type: 1, code: 25(LPgFwd), value: 1, time: 1609769242.64494
01-04 08:07:22.110  3594  4345 V KOReader:  key event => type: 1, code: 25(LPgFwd), value: 0, time: 1609769242.110600
01-04 08:07:28.905  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 1, time: 1609769248.903699
01-04 08:07:28.941  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 0, time: 1609769248.941216
01-04 08:07:29.607  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 1, time: 1609769249.607180
01-04 08:07:29.644  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 0, time: 1609769249.644767
01-04 08:09:52.454  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 1, time: 1609769392.454693
01-04 08:09:52.472  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 0, time: 1609769392.472688
01-04 08:09:53.864  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 1, time: 1609769393.864320
01-04 08:09:53.883  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 0, time: 1609769393.883192
01-04 08:09:56.520  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 1, time: 1609769396.520301
01-04 08:09:56.537  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 0, time: 1609769396.537874
01-04 08:10:01.673  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 1, time: 1609769401.673846
01-04 08:10:01.693  3594  4345 V KOReader:  key event => type: 1, code: 24(LPgBack), value: 0, time: 1609769401.693444
01-04 08:10:25.103  3594  4345 V KOReader:  key event => type: 1, code: 25(LPgFwd), value: 1, time: 1609769425.101081
01-04 08:10:25.148  3594  4345 V KOReader:  key event => type: 1, code: 25(LPgFwd), value: 0, time: 1609769425.148054
01-04 08:12:57.155  3594  4345 V KOReader:  key event => type: 1, code: 25(LPgFwd), value: 1, time: 1609769577.155069
01-04 08:12:57.278  3594  4345 V KOReader:  key event => type: 1, code: 25(LPgFwd), value: 0, time: 1609769577.278098
01-04 08:15:09.767  3594  4345 V KOReader:  key event => type: 1, code: 25(LPgFwd), value: 1, time: 1609769709.767452
01-04 08:15:09.810  3594  4345 V KOReader:  key event => type: 1, code: 25(LPgFwd), value: 0, time: 1609769709.810470
Still though this is about as lazy as it gets, the only way I could be lazier is to have a voice interface to say next page etc or have someone turn the page for me
arooni is offline   Reply With Quote
Old 01-04-2021, 03:30 PM   #6
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: 747
Karma: 1224327
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by arooni View Post
Looks like the basic next page are automatically supported, but would love to be able to map the spen to more features. Unfortunately I couldn't seem to make any other gestures generate key codes in koreader
We log every keycode that reachs the app, so that means the S-Pen doesn't send them. There's an SDK in https://developer.samsung.com/galaxy.../overview.html. Sadly (or happily?) these SDKs are incompatible with the license of KOReader, so there's no way to integrate them, even if possible.

Quote:
Originally Posted by arooni View Post
Still though this is about as lazy as it gets, the only way I could be lazier is to have a voice interface to say next page etc or have someone turn the page for me
Also possible for Play Store apps with certain Google API's. Can't integrate them either.

People that want these kind of "special features" can tinker a bit with an arduino or similar board, using a bluetooth library, and create their own HID devices, with all sorts of custom stuff.
pazos is offline   Reply With Quote
Old 01-06-2021, 10:30 AM   #7
arooni
Addict
arooni began at the beginning.
 
Posts: 230
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
with tasker there is a way to capture more spen actions and map them to things; but I'm not sure how I could send koreader a keycode FROM tasker. maybe that's possible

reference: https://www.xda-developers.com/custo...re-tasker/amp/
arooni is offline   Reply With Quote
Old 01-06-2021, 11:27 AM   #8
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: 747
Karma: 1224327
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by arooni View Post
with tasker there is a way to capture more spen actions and map them to things; but I'm not sure how I could send koreader a keycode FROM tasker. maybe that's possible

reference: https://www.xda-developers.com/custo...re-tasker/amp/
Nope, it is not possible.

Apps are isolated and that's a good thing. We don't want external apps injecting events to KOReader context.

It is still possible to interface with 3rd party apps, but is a rather complex issue as:

1. in order to not to expose most users that aren't aware of such feature that behaviour would be on a different apk, signed with the same key, that communicates with KOReader apk using AIDL

2. The 2nd apk would need to expose a custom permission (lets call it KOReader-inject-input).

3. All clients that want to interact with KO and inject input events in a KO context would need to add that permission to their manifests

4. Apps with that permission granted would be able to bind to the service provided in the application context, and send events, that our plugin would receive and send to the core app, that would schedule them in the input queue, so they can be consumed by the frontend logic of KO.

Note that all of that are fun concepts to play with in the theoretical level but a PITA to implement for such a meaningless feature.

For less money than a SPen you can build yourself a "magic gesture" input device with a 3-axis accelerometer, a bluetooth module and some microcontroller. That input device would code air gestures as input events and send them via bluetooth. It sounds funnier, at least to me
pazos is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Koreader for Android cannot be controlled by Xbox Bluetooth controller Poto KOReader 2 08-23-2020 09:39 AM
Pair a Bluetooth Keyboard to Kindle Paperwhite 4 pavel-s Kindle Developer's Corner 7 05-11-2020 05:40 PM
KOReader not working on Kindle Paperwhite 3 (Wifi) TRPGentlemen KOReader 0 12-28-2016 07:38 AM
Request HP Wireless keyboard (bluetooth) Gerrye enTourage eDGe 6 08-17-2012 03:42 PM


All times are GMT -4. The time now is 01:32 PM.


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