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

Add Support for Inline Japanese Input in Firenvim #1643

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mtanda
Copy link

@mtanda mtanda commented Oct 6, 2024

will fix #1642

I utilized the existing KeyHandler. I made the background of the KeyHandler transparent and displayed it in front of the canvas to show the Japanese text being input. Normally, the display moves along with the mouse cursor, but I modified it to appear at the cursor position only while typing.

Since I haven’t fully explored the entire Firenvim implementation, there is a possibility that my changes might unintentionally break some existing functionality.

Before changes:
https://github.com/user-attachments/assets/fe63ff90-61ca-461f-af8d-33576dcefb2e

After changes:
https://github.com/user-attachments/assets/0c6a7277-e6f3-4183-90ba-97772b7df27e

@glacambre
Copy link
Owner

Thanks a lot for taking the time to implement this (and for recording videos - very helpful!). The only issue I'm seeing is that now the textarea's blinking caret is visible when moving the mouse around. As far as I can tell, adding caret-color: transparent; to the keyhandler's CSS is enough to fix it. Could you let me know if this has any adverse effects on your side?

@mtanda
Copy link
Author

mtanda commented Oct 8, 2024

Thank you for your feedback and for the suggestion! I’ve applied the fix by adding caret-color: transparent; to the keyhandler's CSS, and it appears that the blinking caret is now gone as expected.

To confirm, I’ve attached a new video that shows the updated behavior without the blinking caret issue. Please let me know if everything looks good or if there’s anything else I should address.

japanese_input3.mp4

@mtanda
Copy link
Author

mtanda commented Oct 10, 2024

I’ve made an additional fix so that the textarea no longer intercepts mouse events except while typing in Japanese. Previously, mouse events (such as right-click) were being intercepted, which prevented nvim’s context menu from displaying properly. Now, outside of Japanese input, mouse events are not intercepted, allowing nvim to handle them as expected.

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

Successfully merging this pull request may close these issues.

Add Support for Inline Japanese Input in Firenvim
2 participants