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

Controller Settings

boolean
default:"enabled"
Whether to allow controller input from the client.
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)

Auto Gamepad Selection

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

DualShock 4 Settings

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

DualSense Settings

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

Controller Button Mapping

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

Keyboard Settings

boolean
default:"enabled"
Whether to allow keyboard input from the client.
number
default:"500"
Initial delay in milliseconds before repeating keys.
number
default:"24.9"
How often keys repeat per second (supports decimals).
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)
boolean
default:"disabled"
Remap Right Alt key to Windows key. Useful when Moonlight cannot send the Windows key directly.

Key Bindings

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.

Mouse Settings

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

Example Configuration

Auto Controller Selection

Fixed Xbox 360 Controller (Windows)

DualShock 4 with Motion (Windows)

DualSense Controller (Linux)

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