File tree 2 files changed +17
-14
lines changed
Assets/HoloToolkit/UX/Scripts
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()
253
253
254
254
// Setting the keyboardType to an undefined TouchScreenKeyboardType,
255
255
// which prevents the MRTK keyboard from triggering the system keyboard itself.
256
- InputField . keyboardType = ( TouchScreenKeyboardType ) ( - 1 ) ;
256
+ InputField . keyboardType = ( TouchScreenKeyboardType ) ( int . MaxValue ) ;
257
257
258
258
// Keep keyboard deactivated until needed
259
259
gameObject . SetActive ( false ) ;
Original file line number Diff line number Diff line change @@ -34,21 +34,24 @@ public override void OnPointerClick(PointerEventData eventData)
34
34
{
35
35
base . OnPointerClick ( eventData ) ;
36
36
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 )
45
38
{
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
+ }
48
50
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
+ }
52
55
}
53
56
54
57
/// <summary>
You can’t perform that action at this time.
0 commit comments