Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Native popups when copying Japanese text #680

Closed
Bakadori opened this issue Jul 22, 2020 · 3 comments · Fixed by #1246
Closed

Native popups when copying Japanese text #680

Bakadori opened this issue Jul 22, 2020 · 3 comments · Fixed by #1246

Comments

@Bakadori
Copy link

Is there a way to make this more selective? This option is extremely useful but I don't necessarily want to look up every Japanese text I copy. If such thing can be implemented, it would be great to have the popup actually come on top of the other application when I do want to search.

Also, maybe because its different resolution or arrangement, when I do the copying in my secondary screen the popup opens too up, it's upper half off-screen. If I resize the popup, it comes down becoming entirely visible.

screen

Total newbie, excuse me if this is not the right place to post this.

@toasted-nutbread
Copy link
Collaborator

Is there a way to make this more selective?

This depends on what you mean by "more selective". The application would need a way to determine what your intent is. It may be possible to add support for a global keyboard shortcut that can be configured, if that is helpful.

If such thing can be implemented, it would be great to have the popup actually come on top of the other application when I do want to search.

I'll have to experiment some more with this, but this may not be possible. I know Windows likes to restrict the conditions under which a new window will take focus, and unfortunately the popup window cannot be set to be always-on-top (at least not without installing another extension component).

Also, maybe because its different resolution or arrangement, when I do the copying in my secondary screen the popup opens too up, it's upper half off-screen. If I resize the popup, it comes down becoming entirely visible.

I may look into making the size/positioning of the native window more configurable; I think it's possible to make it take up a half/quadrant of a screen, maybe similar to how the (Windows key + Arrow key) functionality works.

@Bakadori
Copy link
Author

This depends on what you mean by "more selective". The application would need a way to determine what your intent is. It may be possible to add support for a global keyboard shortcut that can be configured, if that is helpful.

I suppose the way to go is a shortcut, or some sort of keystroke (copying twice in rapid succession, like a double click? I don't know the first thing about writing code, so I'm bound to propose something silly).

By the way, I totally forgot about this, but the Copy Popup is a blessing in other apps because hover+SHIFT only works in the browser, but in the browser is sort of redundant to me? Can this be configurable? Disabling Copy Popup in the browser for example.

I hope you can make the size/positioning of the popup more configurable, even if the always on top isn't possible.

@toasted-nutbread
Copy link
Collaborator

The shortcuts and window configuration settings have been added.

By the way, I totally forgot about this, but the Copy Popup is a blessing in other apps because hover+SHIFT only works in the browser, but in the browser is sort of redundant to me? Can this be configurable? Disabling Copy Popup in the browser for example.

This is not as easy to do, unfortunately. Due to the way that clipboard changes are detected, there would be a race condition for detecting clipboard changes on browser tabs vs globally, which would inevitably cause flaky behaviour. For now, I am deciding to now implement this feature due to possible inconsistent/bad user experience.

However, at some point, the clipboard change detection may need to be updated altogether due to browser extension architecture changes (#1247), so depending on what happens there, this problem can be revisited. No guarantees on future feasibility though.

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

Successfully merging a pull request may close this issue.

2 participants