-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
changed keyboard input to multilingual #402
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very elegant solution for the keyboard layout problem. Overall LGTM, besides one minor comment.
In the future we should refactor fnc_terminal_addEventHandler
since it is quite long and convoluted IMHO.
_consoleOutput ctrlSetStructuredText (composeText _output); | ||
|
||
private _consoleInput = _consoleOutput getVariable ["AE3_consoleInput", controlNull]; | ||
ctrlSetFocus _consoleInput; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to set the focus again?
If this is important, please add a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GermanHydrogen The focus changes in cases where the player clicks on other UI elements like the buttons in the header. I don't think that it's strictly necessary but this way we ensure that the focus is on the input field.
Merging this pull request will change the keyboard input. It's now handled via an invisible input text field that processes the input independently fromt the used keyboard layout. Then I copy the resulting characters to our terminal buffer. Now there is no need anymore for the corresponding CBA setting and switching keyboard layouts. All code belonging to keyboard switching was removed.
I still need to check how this will behave for eastern users like chinese and how do they input via the IME