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

additional physical button page turn control in reader #1298

Open
1 task done
Katerni opened this issue Feb 22, 2025 · 6 comments
Open
1 task done

additional physical button page turn control in reader #1298

Katerni opened this issue Feb 22, 2025 · 6 comments

Comments

@Katerni
Copy link

Katerni commented Feb 22, 2025

Describe your suggested feature

I use a ticktock scroll ring to flip pages in moon reader + and kindle (mobility issues). It does not work in kotatsu. I think the ring sends arrow key or dpad up/down signals. Can we please get the same functionality in Kotatsu?

Acknowledgements

  • This is not a duplicate of an existing issue. Please look through the list of open issues before creating a new one.
@MariusAlbrecht
Copy link
Contributor

I've looked around the web briefly but haven't found much technical information (ie what's expected of an app for it to be compatible).

Does it maybe work if you set the reading direction to vertical?

@Koitharu
Copy link
Member

dpad up/down buttons should work fine..

@EmptyDogg
Copy link

Looks like there's multiple Bluetooth rings sold as a 'TikTok scroll ring', but little to no documentation on what signals they actually send.

I tried connecting a keyboard and a DualShock 4 (PS4 controller) via Bluetooth to my phone, and the arrow keys (up, down, left, right), both page up and page down keys, and each of the 4 cardinal directions on both the d-pad and left analog stick, and the triangle face button all caused Kotatsu to scroll up or down in varying amounts.
In case it makes any difference, this test was performed on version 7.7.11, released yesterday, and downloaded from the GitHub releases page.


I'm not certain off the top of my head which version of Android added it, but if you can, I'd recommend enabling Developer options, and looking through them to see if you can turn on "Show key presses", which will briefly show what key has been pressed on screen, then try pressing buttons on your 'scroll ring' and post back here what each button shows up as.


NB: The "Show key presses" only shows what Android classifies as hardware keys, which doesn't always actually mean what it sounds like, so it's possible this won't help, but I think it's worth a try.
For instance:

  • Pressing the back (triangle) and home (circle) buttons, which on my phone are on-screen, and are not in any way 'hardware-buttons' showed visual feedback, but the 'recent apps' button (a square these days) which opens the window switcher, and is right next to them doesn't.
  • Most of the buttons on my DS4 showed something (including L2 & R2 which technically aren't), but the d-pad (which I think most people would describe as being four 'hardware-buttons') and using analog sticks did not.

@Katerni
Copy link
Author

Katerni commented Feb 28, 2025

I don't seem to have a ' show key presses' option- probably because I'm using a Samsung tablet and they diverge so much from stock android. Nothing related to inputs at all in developer settings. I am using version Kotatsu 7.7.11 as well.

I tried to use shizuku to get what the press was, but it wouldn't register it as a normal input event ( it 'tabbed' over in the program and selected another entry field instead). The shizuku documentation specifically says it can't handle some system inputs and specifically lists the dpad as one of them- so perhaps it's not the dpad but something adjacent?

This is the ring I have, since there are so many variants (different listing but same model): https://tinyurl.com/47h934uw

I was able to make a a work around by switching the mode of the ring to the media mode, where the buttons are 'play next' and ' play previous' which shizuku could then register and translate to volume up and down presses. A little kludgy and I can't listen to music while reading but it works.

@EmptyDogg
Copy link

EmptyDogg commented Feb 28, 2025

You might be able to figure out what input it's sending using one of these apps, and if you're OK with a key remapping workaround, as you've described, you may be able to use one of them to make a similar type of workaround for the other input setting so that you can more easily switch between page-turning and media-control mode, or even to set up single/double/long press mappings to not even have to switch modes.

Button Mapper would probably be the easiest, if it works for you out of the box: Homepage, Google Play
It's a free app I've used on an Android TV device before, and while it can be kind of limiting in what it can do, and a lot of its functionality is locked behind a paywall, it's pretty easy to set up. (Unless you buy the pro version in which case you can use some more advanced settings and techniques.)

Key Mapper is an open source app with some more customisability out of the box: Open Source Project (GitHub), XDA thread, Google Play, F-Droid, Documentation
It's an open source project, which unfortunately couldn't handle the specific thing that made me go look for alternatives to Button Mapper, but it has options for things like setting up constraints on your mappings so that they (for instance) only take effect when you're in a specific app, and multi-step triggers, and more... though despite being open source, some "advanced" options require a purchase through the Google Play store.

Tasker seems to be everyone's favorite automation app for Android... and requires payment even for its basic functionality: Homepage, Google Play
Probably overkill for your needs, unless other apps can't detect the inputs you want to use, or if you have other, more advanced things you want to do too, in which case this app could do double duty... if you pay for it. I'd describe how it works if I had ever tried it, but the whole 'must purchase to do anything' concept turned me away from it.
Note: While it does cost money, there is a Free Trial Download available if you want to try it and see if it can tell your what input Kotatsu would have to accept to support your device, or obviously, if you like the app and want to buy & use it, for this or any other purpose.

Automate is a free app that (at least conceptually) is similar to Tasker: Google Play
It has a lot of options, and can seem a little overwhelming when you first get into it, but it's actually a pretty simple flowchart style programming system where you place blocks and connect the output of one to the input of another. Like everything on this list, it should also be able to detect and identify inputs, as well as do remapping, but similar to Tasker, unless the other apps aren't working for you, or you're doing more than just a simple input remap, it might be more than you really need to mess with.

Easer is basically the open source alternative to Tasker and Automate Homepage, Open Source Project (GitHub), F-Droid
I didn't know about it when I last had need for something like them, so I don't have experience with it yet, but based on the screenshots I've seen, it looks to be fairly similar to Automate, but it's open source, so next time I need something more advanced than Button Mapper or Key Mapper, I'll be trying it out. I remember reading somewhere that it may not be as feature complete, or polished as Tasker or Automate, but that was quite a while ago, so it could be as good as or better than them by now, I don't know.

[Edit: I misremembered something, so I fixed it, and I also added more options.]
[Edit: Fixed link formatting.]

@Katerni
Copy link
Author

Katerni commented Mar 1, 2025

Wow that is a great list! I actually used key mapper with shizuku for my work around, they have pretty seamless integration. And i am very familiar with tasker( they really make you pay now before you can even use it?? Ew!) but the rest of these I've never heard of! Thank you very much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants