You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This is a problem report about a one-line text box for prompt input, such as on the "Generate Text" screen.
When entering a language other than English (such as Japanese) in this text box, the generation process is called because it is mistakenly judged that prompt input is completed while the character string is being entered.
To Reproduce
Requirements :
Japanese or other IMEs available in Windows environments
Steps to reproduce the behavior:
Go to 'Generate Text'
Enable IME
Type some charactors
Confirm the conversion candidate with the Enter key
Even though I'm in the middle of a sentence, GenerateText is called.
Expected behavior
The ENTER keystroke to confirm the conversion of an IME does not invoke the generation process.
When you complete the input of a sentence, a single Enter key is used to invoke the generation process.
Please complete the following information:
App Version : Version 0.3.6.0 from Microsoft Store and Latest Build from GitHub main branch.
Additional context
The reason for this is that in languages other than English, you press the Enter key to confirm the IME conversion.
The current logic is to call the generation process (e.g. GenerateText() method) whenever there is an Enter key input after a character is entered in TextBox.
However, if we are considering IME conversion, we should add an implementation that ignores the IME conversion confirmation Enter.
I have an idea to solve this problem.
Because the KeyDown event does not occur during IME input, it can be determined that the IME is being entered when the Enter key has not been entered in the previous KeyDown event. By adding this condition to the KeyUp event handler, it is possible to ignore Enter when the IME conversion is confirmed and call the generation process only with Enter when the string input is completed.
For example, I have been able to confirm that if I rewrite the event handler of the TextBox in Generate.xaml.cs as follows, it behaves as expected:
There might be a better way, so I've filed an issue once, but if you like, I can add this implementation to the TextBox where the behavior occurs and make it a pull request.
The text was updated successfully, but these errors were encountered:
Describe the bug
This is a problem report about a one-line text box for prompt input, such as on the "Generate Text" screen.
When entering a language other than English (such as Japanese) in this text box, the generation process is called because it is mistakenly judged that prompt input is completed while the character string is being entered.
To Reproduce
Requirements :
Steps to reproduce the behavior:
Expected behavior
Please complete the following information:
Additional context
The reason for this is that in languages other than English, you press the Enter key to confirm the IME conversion.
The current logic is to call the generation process (e.g. GenerateText() method) whenever there is an Enter key input after a character is entered in TextBox.
However, if we are considering IME conversion, we should add an implementation that ignores the IME conversion confirmation Enter.
I have an idea to solve this problem.
Because the KeyDown event does not occur during IME input, it can be determined that the IME is being entered when the Enter key has not been entered in the previous KeyDown event. By adding this condition to the KeyUp event handler, it is possible to ignore Enter when the IME conversion is confirmed and call the generation process only with Enter when the string input is completed.
For example, I have been able to confirm that if I rewrite the event handler of the TextBox in Generate.xaml.cs as follows, it behaves as expected:
There might be a better way, so I've filed an issue once, but if you like, I can add this implementation to the TextBox where the behavior occurs and make it a pull request.
The text was updated successfully, but these errors were encountered: