This site has been permanently archived. The content on this site was last updated in 2019.
Stay organized with collections
Save and categorize content based on your preferences.
GvrKeyboard
Handles keyboard state management such as hiding and displaying the keyboard, directly modifying text and stereoscopic rendering.
Summary
Inheritance
Inherits from: MonoBehaviour
Public attributes
|
distance = 0
|
float
The distance to the keyboard.
|
inputMode = GvrKeyboardInputMode.DEFAULT
|
GvrKeyboardInputMode
The input mode of the keyboard.
|
keyboardDelegate = null
|
Delegate to handle keyboard events and input.
|
useRecommended = true
|
bool
Flag to use the recommended world matrix for the keyboard.
|
Properties
|
EditorText
|
string
Gets or sets the text being affected by this keyboard.
|
IsReady
|
bool
Gets a value indicating whether this keyboard is ready.
|
IsValid
|
bool
Gets a value indicating whether this keyboard instance is valid.
|
Mode
|
GvrKeyboardInputMode
Gets the current input mode of the keyboard.
|
WorldMatrix
|
Matrix4x4
Gets the world matrix of the keyboard.
|
Public functions
|
ClearText()
|
void
Resets keyboard text.
|
EditTextCallback(string edit_text)
|
delegate void
Edit text keyboard delegate type.
|
ErrorCallback(GvrKeyboardError err)
|
delegate void
Keyboard error delegate type.
|
Hide()
|
void
Hides the keyboard.
|
KeyboardCallback(IntPtr closure, GvrKeyboardEvent evt)
|
delegate void
Keyboard delegate type.
|
OnPointerClick(BaseEventData data)
|
void
Handle a pointer click on the keyboard.
|
Show()
|
void
Shows the keyboard.
|
StandardCallback()
|
delegate void
Standard keyboard delegate type.
|
Public attributes
distance
float distance = 0
The distance to the keyboard.
GvrKeyboardInputMode inputMode = GvrKeyboardInputMode.DEFAULT
The input mode of the keyboard.
useRecommended
bool useRecommended = true
Flag to use the recommended world matrix for the keyboard.
Properties
EditorText
string EditorText
Gets or sets the text being affected by this keyboard.
The text being affected by this keyboard.
IsReady
bool IsReady
Gets a value indicating whether this keyboard is ready.
Value true
if this keyboard is ready, false
otherwise.
IsValid
bool IsValid
Gets a value indicating whether this keyboard instance is valid.
Value true
if this keyboard instance is valid, false
otherwise.
Mode
GvrKeyboardInputMode Mode
Gets the current input mode of the keyboard.
The current input mode of the keyboard.
WorldMatrix
Matrix4x4 WorldMatrix
Gets the world matrix of the keyboard.
The world matrix of the keyboard.
Public functions
ClearText
void ClearText()
EditTextCallback
delegate void EditTextCallback(
string edit_text
)
Edit text keyboard delegate type.
Details |
Parameters |
edit_text
|
The edited text which has been typed into the keyboard.
|
|
ErrorCallback
delegate void ErrorCallback(
GvrKeyboardError err
)
Keyboard error delegate type.
Details |
Parameters |
err
|
The error which raised this callback.
|
|
KeyboardCallback
delegate void KeyboardCallback(
IntPtr closure,
GvrKeyboardEvent evt
)
Keyboard delegate type.
Details |
Parameters |
closure
|
A closure around the method to call.
|
evt
|
The event which prompted this callback.
|
|
OnPointerClick
void OnPointerClick(
BaseEventData data
)
Handle a pointer click on the keyboard.
Details |
Parameters |
data
|
The event data associated with this callback.
|
|
StandardCallback
delegate void StandardCallback()
Standard keyboard delegate type.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[null,null,["Last updated 2024-10-09 UTC."],[[["\u003cp\u003e\u003ccode\u003eGvrKeyboard\u003c/code\u003e manages keyboard visibility, text modification, and stereoscopic rendering in VR.\u003c/p\u003e\n"],["\u003cp\u003eIt offers customizable distance, input mode, and delegate for handling keyboard events.\u003c/p\u003e\n"],["\u003cp\u003eProvides properties to access and modify the keyboard's text, status, and world matrix.\u003c/p\u003e\n"],["\u003cp\u003eIncludes functions for showing/hiding the keyboard, clearing text, and handling pointer clicks.\u003c/p\u003e\n"],["\u003cp\u003eDelegate types like \u003ccode\u003eEditTextCallback\u003c/code\u003e, \u003ccode\u003eErrorCallback\u003c/code\u003e, and \u003ccode\u003eKeyboardCallback\u003c/code\u003e are available for specific events.\u003c/p\u003e\n"]]],["The `GvrKeyboard` class manages keyboard interactions, including hiding and showing the keyboard. Key actions include using delegates for handling events, such as text editing, errors, and pointer clicks. It can clear text, and manage input modes, and keyboard positioning. Core information includes properties for `EditorText`, `IsReady`, `IsValid`, current input `Mode`, and `WorldMatrix`. The class uses `distance`, `inputMode`, `keyboardDelegate` and `useRecommended` to configure the keyboard.\n"],null,["# GvrKeyboard Class Reference\n\nGvrKeyboard\n===========\n\nHandles keyboard state management such as hiding and displaying the keyboard, directly modifying text and stereoscopic rendering.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: MonoBehaviour\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [distance](#classGvrKeyboard_1a23e75442e48bc9fe9a29adc1f45e6099)` = 0` | `float` The distance to the keyboard. |\n| [inputMode](#classGvrKeyboard_1a4f2aadc7a29a08dc4d7de81a628bdd89)` = GvrKeyboardInputMode.DEFAULT` | `GvrKeyboardInputMode` The input mode of the keyboard. |\n| [keyboardDelegate](#classGvrKeyboard_1a7d2a961df6a2b08f30756740328722e1)` = null` | [GvrKeyboardDelegateBase](/vr/reference/unity/class/GvrKeyboardDelegateBase#classGvrKeyboardDelegateBase) Delegate to handle keyboard events and input. |\n| [useRecommended](#classGvrKeyboard_1a8be290a79138fb2e43661e6d75a342c9)` = true` | `bool` Flag to use the recommended world matrix for the keyboard. |\n\n| ### Properties ||\n|---------------------------------------------------------------------|-------------------------------------------------------------------------|\n| [EditorText](#classGvrKeyboard_1a01ec8badc1644173c443bdd62f798525) | `string` Gets or sets the text being affected by this keyboard. |\n| [IsReady](#classGvrKeyboard_1a4a4f8d90a5f76cd9e055936b0b3438f5) | `bool` Gets a value indicating whether this keyboard is ready. |\n| [IsValid](#classGvrKeyboard_1acdd4c54ac64c1238741710bcafd22481) | `bool` Gets a value indicating whether this keyboard instance is valid. |\n| [Mode](#classGvrKeyboard_1ae29613bed226e5824eb5aa5ba6a0b30b) | `GvrKeyboardInputMode` Gets the current input mode of the keyboard. |\n| [WorldMatrix](#classGvrKeyboard_1a0d299e8e36f023682b2a6c8835811b09) | `Matrix4x4` Gets the world matrix of the keyboard. |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|\n| [ClearText](#classGvrKeyboard_1a8e12817cebe03db6b4669b4a02dcfc38)`()` | `void` Resets keyboard text. |\n| [EditTextCallback](#classGvrKeyboard_1a8507757f98d7618514174215e3f9dd71)`(string edit_text)` | `delegate void` Edit text keyboard delegate type. |\n| [ErrorCallback](#classGvrKeyboard_1a0d71aa6dce0a4cbf3ceeafd220bbb79a)`(GvrKeyboardError err)` | `delegate void` Keyboard error delegate type. |\n| [Hide](#classGvrKeyboard_1a658187bd19febc42964c6105cb2fd10c)`()` | `void` Hides the keyboard. |\n| [KeyboardCallback](#classGvrKeyboard_1a5b101126188ea00898984ee76888af37)`(IntPtr closure, GvrKeyboardEvent evt)` | `delegate void` Keyboard delegate type. |\n| [OnPointerClick](#classGvrKeyboard_1a73dd306e22a84d0320f7dac1eeefbce2)`(BaseEventData data)` | `void` Handle a pointer click on the keyboard. |\n| [Show](#classGvrKeyboard_1a8de86dd8ad22c29bcf2f9996e2c41448)`()` | `void` Shows the keyboard. |\n| [StandardCallback](#classGvrKeyboard_1a8bf5d1a8ed6d21b16c1567cb88c9b52d)`()` | `delegate void` Standard keyboard delegate type. |\n\nPublic attributes\n-----------------\n\n### distance\n\n```c#\nfloat distance = 0\n``` \nThe distance to the keyboard. \n\n### inputMode\n\n```c#\nGvrKeyboardInputMode inputMode = GvrKeyboardInputMode.DEFAULT\n``` \nThe input mode of the keyboard. \n\n### keyboardDelegate\n\n```c#\nGvrKeyboardDelegateBase keyboardDelegate = null\n``` \nDelegate to handle keyboard events and input. \n\n### useRecommended\n\n```c#\nbool useRecommended = true\n``` \nFlag to use the recommended world matrix for the keyboard.\n\nProperties\n----------\n\n### EditorText\n\n```c#\nstring EditorText\n``` \nGets or sets the text being affected by this keyboard.\n\nThe text being affected by this keyboard. \n\n### IsReady\n\n```c#\nbool IsReady\n``` \nGets a value indicating whether this keyboard is ready.\n\nValue `true` if this keyboard is ready, `false` otherwise. \n\n### IsValid\n\n```c#\nbool IsValid\n``` \nGets a value indicating whether this keyboard instance is valid.\n\nValue `true` if this keyboard instance is valid, `false` otherwise. \n\n### Mode\n\n```c#\nGvrKeyboardInputMode Mode\n``` \nGets the current input mode of the keyboard.\n\nThe current input mode of the keyboard. \n\n### WorldMatrix\n\n```c#\nMatrix4x4 WorldMatrix\n``` \nGets the world matrix of the keyboard.\n\nThe world matrix of the keyboard.\n\nPublic functions\n----------------\n\n### ClearText\n\n```c#\nvoid ClearText()\n``` \nResets keyboard text. \n\n### EditTextCallback\n\n```c#\ndelegate void EditTextCallback(\n string edit_text\n)\n``` \nEdit text keyboard delegate type.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |-------------|---------------------------------------------------------| | `edit_text` | The edited text which has been typed into the keyboard. | |\n\n### ErrorCallback\n\n```c#\ndelegate void ErrorCallback(\n GvrKeyboardError err\n)\n``` \nKeyboard error delegate type.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|-----------------------------------------------------------------------------------------------------|\n| Parameters | |-------|---------------------------------------| | `err` | The error which raised this callback. | |\n\n### Hide\n\n```c#\nvoid Hide()\n``` \nHides the keyboard. \n\n### KeyboardCallback\n\n```c#\ndelegate void KeyboardCallback(\n IntPtr closure,\n GvrKeyboardEvent evt\n)\n``` \nKeyboard delegate type.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |-----------|-----------------------------------------| | `closure` | A closure around the method to call. | | `evt` | The event which prompted this callback. | |\n\n### OnPointerClick\n\n```c#\nvoid OnPointerClick(\n BaseEventData data\n)\n``` \nHandle a pointer click on the keyboard.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|-----------------------------------------------------------------------------------------------------------------------|\n| Parameters | |--------|-----------------------------------------------| | `data` | The event data associated with this callback. | |\n\n### Show\n\n```c#\nvoid Show()\n``` \nShows the keyboard. \n\n### StandardCallback\n\n```c#\ndelegate void StandardCallback()\n``` \nStandard keyboard delegate type."]]