Skip to content

Keyboard

murpyh edited this page Sep 17, 2022 · 35 revisions

A device which allows you to get player input using a keyboard-like interface.

Table of contents

Methods

Events


void Keyboard:SimulateKeyPress(string? key, string Player)

Takes a string as a key to press and simulates pressing that key for the Keyboard.


void Keyboard:SimulateTextInput(string? input, string Player)

Takes a string as input and simulates typing that string for the Keyboard.


Event Keyboard.KeyPressed(KeyCode key, string keyString, UserInputState state, string Player)

An event which fires when a player sitting on a Seat connected to the Keyboard presses a key. keyString is the key pressed as a string (for example, a if the player pressed A.) If shift is held, the keyString will be capitalized. If the key is non-printable (i.e. shift or return) keyString will be nil. state is always Enum.UserInputType.End.


Event Keyboard.TextInputted(string text, string Player)

An event which fires when a Player presses "Enter" on the keyboard UI.

Navigation

Info

Part method & events

Objects

Additional objects used in Microcontrollers

Public Resources

Public code that enhances the experience of using a Microcontroller.

Clone this wiki locally