s&box
RustCounter-Strike 2s&boxDeadlock
Wiki
Get s&box on Steam
Browse
OverviewGetting StartedCreating GamesEngine & ToolsDocumentationCommunity GamesResources
s&boxDocumentationGameplayInputRaw Input
SOURCE 2 · C#
Build and play games with s&box.

Facepunch's game engine and creation platform — make games in C#, or jump straight into community games.

Get s&box on Steam

s&box Wiki

  • Overview
  • Getting Started
  • Creating Games
  • Engine & Tools
  • Documentation
  • Community Games
  • Resources

Tools & Community

  • Getting Started
  • Creating Games
  • Engine & Tools
  • Resources

Platforms

  • RustBattle
  • CSBattle
  • Rust Game Wiki
  • CS2 Skins Wiki
  • Deadlock Wiki

About

  • Official Site
  • Developer Wiki
  • GitHub
  • Get on Steam
NOT AFFILIATED WITH FACEPUNCH STUDIOS · © 2026 s&box Wiki (community)
Docs/Gameplay
Gameplay

Raw Input

:::tip We very much recommend that you only use this if you can't use input actions for whatever reason. You can't rebind these at all.

:::

We have the ability to access keyboard inputs directly, bypassing input actions.

//
// Is the W key down this frame?
//
if ( Input.Keyboard.Down( "W" ) )
{
    Log.Info( "W is down!" );
}

//
// Was the W key pressed this frame?
//
if ( Input.Keyboard.Pressed( "W" ) )
{
    Log.Info( "W was pressed!" );
}

//
// Was the W key released this frame?
//
if ( Input.Keyboard.Released( "W" ) )
{
    Log.Info( "W was released!" );
}

Most of the keys on the keyboard should work, here's an exhaustive list of them.

KeyName
"0" - "9"0 - 9
"a" - "z"A - Z
"KP_0" - "KP_9"Numpad 0 - Numpad 9
"KP_DIVIDE"Numpad /
"KP_MULTIPLY"Numpad *
"KP_MINUS"Numpad -
"KP_PLUS"Numpad +
"KP_ENTER"Numpad Enter
"KP_DEL"Numpad Delete
"<"Less Than
">"More Than
"["Left Bracket
"]"Right Bracket
"SEMICOLON"Semicolon
" ' "Apostrophe
" ` "Backtick / Console Key
","Comma
"."Period
"/"Slash
"\\"Backslash
"-"Hyphen / Minus
"="Equals
"ENTER"Enter
"SPACE"Space
"BACKSPACE"Backspace
"TAB"Tab
"CAPSLOCK"Caps Lock
"NUMLOCK"Num Lock
"ESCAPE"Escape
"SCROLLLOCK"Scroll Lock
"INS"Insert
"DEL"Delete
"HOME"Home
"END"End
"PGUP"Page Up
"PGDN"Page Down
"PAUSE"Pause
"SHIFT"Left Shift
"RSHIFT"Right Shift
"ALT"Left Alt
"RALT"Right Alt
"UPARROW"Up Arrow
"LEFTARROW"Left Arrow
"RIGHTARROW"Right Arrow
"DOWNARROW"Down Arrow

Source: Facepunch/sbox-docs (CC-BY-4.0) · updated 2025-05-15. Read it rendered on the official docs.

More in Gameplay

Clutter
Controller Input
Costs & Filters
Creating Terrain
Gameplay
Glyphs
Input
Inventory
← All documentation

Community wiki — not affiliated with Facepunch Studios. For the latest and most authoritative information, see the official developer wiki.