Key Binding Strings - Valheim-Modding/Wiki GitHub Wiki

Valheim's input system has the following key bindings:

Key Default Binding Axis Inverted
Attack Mouse0 False
SecondAttack Mouse2 False
Block Mouse1 False
Use E False
Hide R False
Jump Space False
Crouch LeftControl False
Run LeftShift False
ToggleWalk C False
AutoRun Q False
Sit X False
GPower F False
AltPlace LeftShift False
Forward W False
Left A False
Backward S False
Right D False
Inventory Tab False
Map M False
MapZoomOut Comma False
MapZoomIn Period False
BuildPrev Q False
BuildNext E False
BuildMenu Mouse1 False
Remove Mouse2 False
JoyUse JoystickButton0 False
JoyHide JoystickButton9 False
JoyJump JoystickButton1 False
JoySit JoystickButton2 False
JoyGPower None JoyAxis 7 True
JoyInventory JoystickButton3 False
JoyRun JoystickButton4 False
JoyCrouch JoystickButton8 False
JoyMap JoystickButton6 False
JoyMenu JoystickButton7 False
JoyBlock None JoyAxis 3 True
JoyAttack None JoyAxis 3 False
JoySecondAttack JoystickButton5 False
JoyAltPlace JoystickButton4 False
JoyRotate None JoyAxis 3 True
JoyPlace None JoyAxis 10 False
JoyRemove JoystickButton5 False
JoyTabLeft JoystickButton4 False
JoyTabRight JoystickButton5 False
JoyLStickLeft None JoyAxis 1 True
JoyLStickRight None JoyAxis 1 False
JoyLStickUp None JoyAxis 2 True
JoyLStickDown None JoyAxis 2 False
JoyButtonA JoystickButton0 False
JoyButtonB JoystickButton1 False
JoyButtonX JoystickButton2 False
JoyButtonY JoystickButton3 False
JoyDPadLeft None JoyAxis 6 True
JoyDPadRight None JoyAxis 6 False
JoyDPadUp None JoyAxis 7 False
JoyDPadDown None JoyAxis 7 True
JoyLTrigger None JoyAxis 3 True
JoyRTrigger None JoyAxis 3 False
JoyLStick JoystickButton8 False
JoyRStick JoystickButton9 False

Displaying keybindings

You can display keybindings by using the $KEY_ prefix in the localization: Localization.instance.Localize("$KEY_Use"); will return "E" by default.