public static abstract sealed class Sandbox.Input.Keyboard
Keyboard related glyph methods.
Related Guides
Broader workflow and conceptual references connected to this API.
You can create your own editor tool to help you create your game. Your tool needs to be created in an editor project.
Some Input methods are specific to Controllers/Gamepads, and are useful to know for making sure your player experience caters to those who don't play on a Keyboard + Mouse.
The s&box editor is your workspace for building games โ scene editing, asset management, visual scripting, and more.
Core gameplay systems โ input, navigation, terrain, and more.
Input glyphs are an easy way to show users which buttons to press for actions, they automatically adjust for whatever device you're using and return appropriate textures.
The PlayerController component is a first and third person player controller.
Methods
Showing 4 methods
public static bool Down(string keyName)
Keyboard key is held down
public static Sandbox.Texture GetGlyph(string key, Sandbox.InputGlyphSize size = 0, bool outline = False)
Get a glyph texture from a specific key name.
Parameters
size: Default: 0outline: Default: False
public static bool Pressed(string keyName)
Keyboard key wasn't pressed but now it is
public static bool Released(string keyName)
Keyboard key was pressed but now it isn't
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | global |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Input.Keyboard |