File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed
Assets/HoloToolkit/UX/Scripts Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ protected override void Awake()
253253
254254 // Setting the keyboardType to an undefined TouchScreenKeyboardType,
255255 // which prevents the MRTK keyboard from triggering the system keyboard itself.
256- InputField . keyboardType = ( TouchScreenKeyboardType ) ( - 1 ) ;
256+ InputField . keyboardType = ( TouchScreenKeyboardType ) ( int . MaxValue ) ;
257257
258258 // Keep keyboard deactivated until needed
259259 gameObject . SetActive ( false ) ;
Original file line number Diff line number Diff line change @@ -34,21 +34,24 @@ public override void OnPointerClick(PointerEventData eventData)
3434 {
3535 base . OnPointerClick ( eventData ) ;
3636
37- Keyboard . Instance . Close ( ) ;
38- Keyboard . Instance . PresentKeyboard ( text , KeyboardLayout ) ;
39-
40- if ( KeyboardSpawnPoint != null )
41- {
42- Keyboard . Instance . RepositionKeyboard ( KeyboardSpawnPoint , null , KeyBoardPositionOffset ) ;
43- }
44- else
37+ if ( ! TouchScreenKeyboard . isSupported )
4538 {
46- Keyboard . Instance . RepositionKeyboard ( transform , null , KeyBoardPositionOffset ) ;
47- }
39+ Keyboard . Instance . Close ( ) ;
40+ Keyboard . Instance . PresentKeyboard ( text , KeyboardLayout ) ;
41+
42+ if ( KeyboardSpawnPoint != null )
43+ {
44+ Keyboard . Instance . RepositionKeyboard ( KeyboardSpawnPoint , null , KeyBoardPositionOffset ) ;
45+ }
46+ else
47+ {
48+ Keyboard . Instance . RepositionKeyboard ( transform , null , KeyBoardPositionOffset ) ;
49+ }
4850
49- // Subscribe to keyboard delegates
50- Keyboard . Instance . OnTextUpdated += Keyboard_OnTextUpdated ;
51- Keyboard . Instance . OnClosed += Keyboard_OnClosed ;
51+ // Subscribe to keyboard delegates
52+ Keyboard . Instance . OnTextUpdated += Keyboard_OnTextUpdated ;
53+ Keyboard . Instance . OnClosed += Keyboard_OnClosed ;
54+ }
5255 }
5356
5457 /// <summary>
You can’t perform that action at this time.
0 commit comments