Versions in this module Expand all Collapse all v1 v1.0.1 Jun 29, 2023 Changes in this version + const ButtonPressedThreshold + const HatDown + const HatLeft + const HatRight + const HatUp + const SDLControllerAxisLeftX + const SDLControllerAxisLeftY + const SDLControllerAxisRightX + const SDLControllerAxisRightY + const SDLControllerAxisTriggerLeft + const SDLControllerAxisTriggerRight + const SDLControllerButtonA + const SDLControllerButtonB + const SDLControllerButtonBack + const SDLControllerButtonDpadDown + const SDLControllerButtonDpadLeft + const SDLControllerButtonDpadRight + const SDLControllerButtonDpadUp + const SDLControllerButtonGuide + const SDLControllerButtonLeftShoulder + const SDLControllerButtonLeftStick + const SDLControllerButtonMax + const SDLControllerButtonMisc1 + const SDLControllerButtonPaddle1 + const SDLControllerButtonPaddle2 + const SDLControllerButtonPaddle3 + const SDLControllerButtonPaddle4 + const SDLControllerButtonRightShoulder + const SDLControllerButtonRightStick + const SDLControllerButtonStart + const SDLControllerButtonTouchpad + const SDLControllerButtonX + const SDLControllerButtonY + func AxisValue(id string, axis StandardAxis, state GamepadState) float64 + func ButtonValue(id string, button StandardButton, state GamepadState) float64 + func HasStandardAxis(id string, axis StandardAxis) bool + func HasStandardButton(id string, button StandardButton) bool + func HasStandardLayoutMapping(id string) bool + func IsButtonPressed(id string, button StandardButton, state GamepadState) bool + func Name(id string) string + func Update(mappingData []byte) error + type GamepadState interface + Axis func(index int) float64 + Button func(index int) bool + Hat func(index int) int + type StandardAxis int + const StandardAxisLeftStickHorizontal + const StandardAxisLeftStickVertical + const StandardAxisMax + const StandardAxisRightStickHorizontal + const StandardAxisRightStickVertical + type StandardButton int + const StandardButtonCenterCenter + const StandardButtonCenterLeft + const StandardButtonCenterRight + const StandardButtonFrontBottomLeft + const StandardButtonFrontBottomRight + const StandardButtonFrontTopLeft + const StandardButtonFrontTopRight + const StandardButtonLeftBottom + const StandardButtonLeftLeft + const StandardButtonLeftRight + const StandardButtonLeftStick + const StandardButtonLeftTop + const StandardButtonMax + const StandardButtonRightBottom + const StandardButtonRightLeft + const StandardButtonRightRight + const StandardButtonRightStick + const StandardButtonRightTop