Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LizardByte/Sunshine/llms.txt

Use this file to discover all available pages before exploring further.

Input configuration controls how Sunshine handles controller, keyboard, and mouse input from Moonlight clients.

Controller Settings

controller
boolean
default:"enabled"
Whether to allow controller input from the client.
controller = enabled
gamepad
string
default:"auto"
The type of gamepad to emulate on the host.Options:
  • auto - Automatically select based on client capabilities
  • x360 - Xbox 360 controller (Windows only)
  • xone - Xbox One controller (FreeBSD/Linux only)
  • ds4 - DualShock 4 controller / PS4 (Windows only)
  • ds5 - DualSense controller / PS5 (FreeBSD/Linux only)
  • switch - Switch Pro controller (FreeBSD/Linux only)
gamepad = auto

Auto Gamepad Selection

motion_as_ds4
boolean
default:"enabled"
If client reports motion sensor support, emulate as DS4 controller.
Only applies when gamepad is set to auto
motion_as_ds4 = enabled
touchpad_as_ds4
boolean
default:"enabled"
If client reports touchpad support, emulate as DS4 controller.
Only applies when gamepad is set to auto
touchpad_as_ds4 = enabled

DualShock 4 Settings

ds4_back_as_touchpad_click
boolean
default:"enabled"
Allow Select/Back button to trigger DS4 touchpad click. Useful for clients emulating touchpad clicks on XInput devices.
Only applies when gamepad is manually set to ds4
ds4_back_as_touchpad_click = enabled

DualSense Settings

ds5_inputtino_randomize_mac
boolean
default:"enabled"
Randomize the MAC address for virtual PS5 controllers.
Linux only, applies to PS5-style controllers
ds5_inputtino_randomize_mac = enabled

Controller Button Mapping

back_button_timeout
number
default:"-1"
Milliseconds to hold Back/Select button to emulate Home/Guide button press.
Set to -1 to disable Home/Guide emulation
back_button_timeout = 2000

Keyboard Settings

keyboard
boolean
default:"enabled"
Whether to allow keyboard input from the client.
keyboard = enabled
key_repeat_delay
number
default:"500"
Initial delay in milliseconds before repeating keys.
key_repeat_delay = 500
key_repeat_frequency
number
default:"24.9"
How often keys repeat per second (supports decimals).
key_repeat_frequency = 24.9
always_send_scancodes
boolean
default:"enabled"
Send scancodes for better game compatibility.
Windows only
Enable if: Keyboard input doesn’t work in certain applicationsDisable if: Keys generate wrong input (non-US keyboard layouts)
always_send_scancodes = enabled
key_rightalt_to_key_win
boolean
default:"disabled"
Remap Right Alt key to Windows key. Useful when Moonlight cannot send the Windows key directly.
key_rightalt_to_key_win = enabled

Key Bindings

keybindings
array
default:"[0x10, 0xA0, 0x11, 0xA2, 0x12, 0xA4]"
Map virtual key codes for special key handling. Useful on Wayland where the Win key cannot be captured.
Not available in Web UI - must be configured in config file
Array must have an even number of elements (pairs of source and target key codes).See Virtual Key Codes for reference.
keybindings = [
  0x10, 0xA0,  # Left Shift
  0x11, 0xA2,  # Left Control  
  0x12, 0xA4,  # Left Alt
  0x4A, 0x4B   # J -> K
]

Mouse Settings

mouse
boolean
default:"enabled"
Whether to allow mouse input from the client.
mouse = enabled
high_resolution_scrolling
boolean
default:"enabled"
Pass through high resolution scroll events from Moonlight.Disable for older applications that scroll too fast with high resolution events.
high_resolution_scrolling = enabled
native_pen_touch
boolean
default:"enabled"
Pass through native pen/touch events from Moonlight.Disable for older applications without native pen/touch support.
native_pen_touch = enabled

Example Configuration

Auto Controller Selection

# Controller
controller = enabled
gamepad = auto
motion_as_ds4 = enabled
touchpad_as_ds4 = enabled

# Keyboard
keyboard = enabled
key_repeat_delay = 500
key_repeat_frequency = 24.9

# Mouse
mouse = enabled
high_resolution_scrolling = enabled
native_pen_touch = enabled

Fixed Xbox 360 Controller (Windows)

# Force Xbox 360 emulation
controller = enabled
gamepad = x360

# Keyboard and mouse
keyboard = enabled
mouse = enabled
always_send_scancodes = enabled

DualShock 4 with Motion (Windows)

# Force DS4 emulation
controller = enabled
gamepad = ds4
ds4_back_as_touchpad_click = enabled
back_button_timeout = 2000

# Enable all input types
keyboard = enabled
mouse = enabled
high_resolution_scrolling = enabled
native_pen_touch = enabled

DualSense Controller (Linux)

# Force DS5 emulation
controller = enabled
gamepad = ds5
ds5_inputtino_randomize_mac = enabled

# Input settings
keyboard = enabled
mouse = enabled

Platform-Specific Notes

  • Xbox 360 (x360) and DualShock 4 (ds4) emulation available
  • always_send_scancodes improves game compatibility
  • Use key_rightalt_to_key_win if Windows key doesn’t work

Troubleshooting

  • Try setting gamepad to a specific controller type instead of auto
  • For Windows games, try x360 (most compatible)
  • Check if the game supports the emulated controller type
  • Disable always_send_scancodes if using non-US keyboard layout
  • Check client keyboard layout matches host
  • Enable key_rightalt_to_key_win to use Right Alt as Windows key
  • On Wayland, configure keybindings to map Win key
  • Ensure client reports touchpad/motion support
  • Set gamepad = ds4 (Windows) or gamepad = ds5 (Linux)
  • Verify touchpad_as_ds4 and motion_as_ds4 are enabled

Next Steps

Network Settings

Configure ports and network access

Applications

Add games and applications to stream

Build docs developers (and LLMs) love