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

Mouse support #32

Closed
hoiou opened this issue Jul 12, 2021 · 2 comments
Closed

Mouse support #32

hoiou opened this issue Jul 12, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@hoiou
Copy link

hoiou commented Jul 12, 2021

When I use a mouse on my tablet I can highlight text and everything but I am unable to scan the text to get dictionary results. Is there a way to set a hotkey or something I yomichan so I can use the middle mouse button to scan? Thank you for your hard work on this amazing project.

@arianneorpilla
Copy link
Owner

arianneorpilla commented Jul 12, 2021

I have a prototype of the scanning working right now and it does not look like it will play well with my Flutter widgets. I can click on paragraphs and select text but it does not layer well with the Flutter widgets I have on top of the web view. That means that click events register through the pop-up widget I have, and makes things like scrolling and clicking things difficult. Looks like mouse events collide through my widgets and regardless of whatever the cursor is on top off, it will register the click both on the Flutter widget and on the browser, which does not look good.

I don't think this prototype can make it to production without some magic JavaScript hacks that are well beyond my scope and I think it would be easier to somehow tell the Android OS to show the context menu whenever you select something with a mouse, which is the crux of the problem here, anyhow. It's not a smooth experience and is very janky.

I think I have to take the loss on this one. I don't think this is possible without significant updates on the web view plugin I'm using and that is already very bleak. I'm afraid I have to restrain myself from releasing support for solutions that are very rough edged and only partially work and require some understanding to know how not to break it as a user.

If I get any epiphanies in the future that make this possible, maybe I would re-open and get back to this but I don't think the prospects look very good on this feature, realistically. Apologies.

@arianneorpilla arianneorpilla self-assigned this Jul 12, 2021
@arianneorpilla arianneorpilla added enhancement New feature or request wontfix This will not be worked on labels Jul 12, 2021
@arianneorpilla
Copy link
Owner

To elaborate, the issue is that the mouse does not mix well with the pop-up widget. Text can be selected just fine. What would be required is an interface that will allow the user to scroll left, scroll right on the pop-up, be able to switch dictionaries and export to the creator -- all buttons that will exist outside of the reader, so probably beside at the top with the rest of the TTU controls.

It would not be elegant and it would feel like a second class citizen experience but maybe I can figure it out in the future, though anything new to be done will be after I have my hiatus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants