menu_bookDocumentation

Raw Input: Direct Keyboard Access Bypassing Input Actions

calendar_today May 20, 2026 schedule ~1 min read person PatrickJr verified 50

s&box provides raw keyboard input access that bypasses input actions. Only use this when input actions won't work — raw inputs cannot be rebound by players.

CSHARP
if ( Input.Keyboard.Down( "W" ) )
    Log.Info( "W is down!" );

if ( Input.Keyboard.Pressed( "W" ) )
    Log.Info( "W was pressed!" );

if ( Input.Keyboard.Released( "W" ) )
    Log.Info( "W was released!" );

Available Keys

  • Letters: "a" through "z"
  • Numbers: "0" through "9"
  • Numpad: "KP0" through "KP9", "KPDIVIDE", "KPMULTIPLY", "KPMINUS", "KPPLUS", "KPENTER", "KPDEL"
  • Arrows: "UPARROW", "DOWNARROW", "LEFTARROW", "RIGHTARROW"
  • Modifiers: "SHIFT", "RSHIFT", "ALT", "RALT"
  • Special: "ENTER", "SPACE", "BACKSPACE", "TAB", "CAPSLOCK", "ESCAPE", "DEL", "INS", "HOME", "END", "PGUP", "PGDN", "PAUSE"
  • Symbols: "[", "]", "SEMICOLON", ",", ".", "/", "\\", "-", "=", "`"
Prefer input actions over raw input for rebindable, device-agnostic controls.
Was this helpful?