Automated: create new component page |
add mega info I hope |
||
Line 3: | Line 3: | ||
|Name=Virtual Key | |Name=Virtual Key | ||
}} | }} | ||
Virtual key is a component that turns a [[Button Events|button event]] into a button press on the keyboard in game as if it came from the physical keyboard. | |||
== Usage == | == Usage == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|TargetKey|Key| | |TargetKey|Key| The key to simulate. | ||
|AppendString|String| | |AppendString|String| What text to append if the user is focused into a text field | ||
|ShiftTargetKey|Key| | |ShiftTargetKey|Key| What key to use if the [[Component:VirtualShift|Virtual Shift component]] is taking effect, or shift is held on the physical keyboard. | ||
|ShiftAppendString|String| | |ShiftAppendString|String| What text to append if the user is focused into a text field and if the [[Component:VirtualShift|Virtual Shift component]] is taking effect, or shift is held on the physical keyboard. | ||
|IgnoreShift|Bool| | |IgnoreShift|Bool| Whether to ignore shift and virtual shift keys entirely. | ||
|ModifierKey|{{RootFieldType|RelayRef`1|[[Component:VirtualModifierKey|VirtualModifierKey]]}}|TypeAdv5=true| | |ModifierKey|{{RootFieldType|RelayRef`1|[[Component:VirtualModifierKey|VirtualModifierKey]]}}|TypeAdv5=true| A key that can act as a special modifier (for example, if you wanted a key on your VR keyboard that appended "Cat!!" every time you type a letter) | ||
|ModifiedTargetKey|Key| | |ModifiedTargetKey|Key| The key to use instead of <code>TargetKey</code> when <code>ModifiedTargetKey</code> is pressed down. | ||
|ModifiedAppendString|String| | |ModifiedAppendString|String| hat text to append if the user is focused into a text field and the key specified by <code>ModifiedTargetKey</code> is pressed down. | ||
|Keyboard|{{RootFieldType|RelayRef`1|[[Component:VirtualKeyboard|VirtualKeyboard]]}}|TypeAdv8=true| | |Keyboard|{{RootFieldType|RelayRef`1|[[Component:VirtualKeyboard|VirtualKeyboard]]}}|TypeAdv8=true| The keyboard object this key is a part of. | ||
}} | }} | ||
== Behavior == | == Behavior == | ||
When paired with a UIX button or physical button on the same slot, it allows for simulation of key presses as if they came from the actual physical keyboard. This can be used for some funny effects where pressing a button forces the user that pressed it to jump (or, god forbid, make them switch to desktop or VR) | |||
== Examples == | == Examples == | ||
Used in the default and custom community keyboards to allow said keyboards to type into the game and textfields. | |||
== See Also == | == See Also == | ||
* [[Component:VirtualKeyboard|Keyboard]] | |||
* [[Component:VirtualModifierKey|Modifier Key]] | |||
[[Category:Components:Userspace:Virtual Keyboard{{#translation:}}|Virtual Key]] | [[Category:Components:Userspace:Virtual Keyboard{{#translation:}}|Virtual Key]] | ||
[[Category:Components{{#translation:}}|Virtual Key]] | [[Category:Components{{#translation:}}|Virtual Key]] | ||
Revision as of 22:29, 16 October 2024
Component image
Virtual key is a component that turns a button event into a button press on the keyboard in game as if it came from the physical keyboard.
Usage
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
TargetKey
|
Key | The key to simulate. |
AppendString
|
String | What text to append if the user is focused into a text field |
ShiftTargetKey
|
Key | What key to use if the Virtual Shift component is taking effect, or shift is held on the physical keyboard. |
ShiftAppendString
|
String | What text to append if the user is focused into a text field and if the Virtual Shift component is taking effect, or shift is held on the physical keyboard. |
IgnoreShift
|
Bool | Whether to ignore shift and virtual shift keys entirely. |
ModifierKey
|
direct RelayRef`1<VirtualModifierKey> | A key that can act as a special modifier (for example, if you wanted a key on your VR keyboard that appended "Cat!!" every time you type a letter) |
ModifiedTargetKey
|
Key | The key to use instead of TargetKey when ModifiedTargetKey is pressed down.
|
ModifiedAppendString
|
String | hat text to append if the user is focused into a text field and the key specified by ModifiedTargetKey is pressed down.
|
Keyboard
|
direct RelayRef`1<VirtualKeyboard> | The keyboard object this key is a part of. |
Behavior
When paired with a UIX button or physical button on the same slot, it allows for simulation of key presses as if they came from the actual physical keyboard. This can be used for some funny effects where pressing a button forces the user that pressed it to jump (or, god forbid, make them switch to desktop or VR)
Examples
Used in the default and custom community keyboards to allow said keyboards to type into the game and textfields.