This repository was archived by the owner on Sep 7, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
com.unity.uiwidgets/Runtime/services Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ class DefaultKeyboardDelegate : KeyboardDelegate, TextInputOnGUIListener {
6767
6868 TextEditingValue _value ;
6969
70+ TextInputConfiguration _textInputConfiguration ;
71+
7072 public void show ( ) {
7173 }
7274
@@ -108,10 +110,12 @@ public void setIMEPos(Offset imeGlobalPos) {
108110
109111 public void setClient ( int client , TextInputConfiguration configuration ) {
110112 _client = client ;
113+ _textInputConfiguration = configuration ;
111114 }
112115
113116 public void clearClient ( ) {
114117 _client = 0 ;
118+ _textInputConfiguration = null ;
115119 }
116120
117121 public bool imeRequired ( ) {
@@ -161,7 +165,8 @@ public void OnGUI() {
161165 }
162166
163167 if ( ch == '\n ' ) {
164- Timer . create ( TimeSpan . Zero , ( ) => { TextInput . _performAction ( _client , TextInputAction . newline ) ; } ) ;
168+ Timer . create ( TimeSpan . Zero , ( ) => { TextInput . _performAction ( _client ,
169+ _textInputConfiguration ? . inputAction ?? TextInputAction . newline ) ; } ) ;
165170 }
166171
167172 if ( _validateCharacter ( ch ) ) {
You can’t perform that action at this time.
0 commit comments