-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Cultural Unicode text cannot be typed into Textbox. #13190
Comments
what is your culture explicitly? |
What are keyboard tools? do you have a screen record for us? |
My culture is Vietnamese (vi-vn)
The tool i'm using is this one: https://evkeyvn.com/ It seems that the error only occurs when i'm using the tools, not by using Windows Cultural display language. But it still works in WPF apps. Here's the recording 2023-10-10.13-12-25.mp4 |
Thank you 🙏 Our text export will have a look once he finds the time to do. |
I am encountering the same issue with Vietnamese characters in the TextBox control. When typing using a keyboard tool like evkeyvn.com, the text disappears, which is not the case when pasting text directly. This issue is impacting the usability of the application for Vietnamese users. Looking forward to a resolution or any suggested workarounds. |
The issue is such a tool isn't translated into English and I do not know how to use it. |
@dieuminhs maybe you can try to help us supporting this? So you may try to adjust the Avalonia source as needed to make it work. For reference check out the PRs that added other keyboard support https://github.com/AvaloniaUI/Avalonia/pulls?q=is%3Apr+ime |
I think that the app simulates key presses instead of implementing some proper input method |
I don't know how the app works but it's working fine in WPF so i think there must be something buggy in AvaloniaUI. |
It's kinda advanced for me haha, but i'll check it out. |
Hi @timunie , it seems like everytime a special cultural character is entered (by typing), the WndProcMessageHandler only receives backspace character. So I wanna ask if there is a way to see what is passed to the delegate in the below picture? |
adding @Gillibald here as it is far beyond my knowledge tbh. |
see
|
It's not this one, what i mean is AppWndProc is called by WndProc and WndProc is called by WndProcMessageHandler which is assigned to _wndProcDelegate, so i wanna know where will _wndProcDelegate be called, thanks. |
@Gillibald I've found the way our cultural tool works, in order to write a cultural character for example á (typing 's' after 'a'), the tool simulate a backspace to delete 'a', then it will perform a SendInput function (winuser.h) using the below input (The keycode is the int value of cultural custom map table. I wonder if these procedures is allowed by Avalonia? |
Text input is handled via WM_KEYDOWN, WM_KEYUP and WM_CHAR Make sure always to produce key_up and key_down Unicode text can be sent via Update: It seems this is the most ideal way of sending emulated key events: |
It seems like when the cultural character is not parsable from Virtual Key or Physical Key, but it can be retrieved correctly by the GetKeySymbol method, is there a way to resolve this ? |
Hello, I am also a Vietnamese user and currently I am having the same error. I don't know if you have fixed this error yet. If you have successfully fixed it, please guide me. @dieuminhs |
I've found 2 workarounds currently, The method belongs to WindowImpl.AppWndProc.cs source file in Avalonia.Win32 Project. |
I think we can add that fix to Avalonia because it seems to be the right thing to do |
Nice, it works for me @dieuminhs |
Ok, i will create a pull request for it, thank you for your help. |
Describe the bug
When the Textbox is inputted by typing with Cultural Unicode text, the whole text disappears but it doesn't when the text is copied and pasted.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The "á, é" text should be display normally instead of blank.
Screenshots
Expected result (Works on WPF).
![image](https://private-user-images.githubusercontent.com/48360748/273778125-90155a4d-37fd-4081-aaf2-39a7b54e2876.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMzc4NDYsIm5iZiI6MTczOTIzNzU0NiwicGF0aCI6Ii80ODM2MDc0OC8yNzM3NzgxMjUtOTAxNTVhNGQtMzdmZC00MDgxLWFhZjItMzlhN2I1NGUyODc2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDAxMzIyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwYzZhYmVlZjNmMDAwMTM5NDE1OTk1ZDI3ZWM3YjgxY2U1NmZkYjRlNmI1MjNjOTg0MWYzYzViMmQ0MDJjNzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.7250cENYowEvO4dqm21XqNIlzx5X062cHmEuzXcT9Mk)
Environment
Additional context
The text was updated successfully, but these errors were encountered: