nx.js
Enumerations

HidNpadButton

Bitmask values for buttons reported by the HID NPad service.

Note: This is the libnx ordering and is not the same as the Web Gamepad API button order. When working with the standard Gamepad.buttons[] array, prefer the Button enum.

Enumeration Members

Enumeration MemberValueDescription
A1A button (right face button on a Pro Controller / Joy-Con grip).
AnyDown8945664Bitmask of all buttons that count as "Down" (D-Pad and either stick).
AnyLeft1118208Bitmask of all buttons that count as "Left" (D-Pad and either stick).
AnyRight4472832Bitmask of all buttons that count as "Right" (D-Pad and either stick).
AnySL83886080Bitmask matching SL on either Joy-Con.
AnySR167772160Bitmask matching SR on either Joy-Con.
AnyUp2236416Bitmask of all buttons that count as "Up" (D-Pad and either stick).
B2B button (down face button).
Down32768D-Pad Down.
HandheldLeftB1073741824B button on a Left NES/HVC controller in Handheld mode.
L64L shoulder button.
LagonCDown4Down C button on the N64 controller. (Overflows 32-bit; do not use.)
LagonCLeft-2147483648Left C button on the N64 controller.
LagonCRight2Right C button on the N64 controller. (Overflows 32-bit; do not use.)
LagonCUp1Up C button on the N64 controller. (Overflows 32-bit; do not use.)
Left4096D-Pad Left.
LeftSL16777216SL button on a Left Joy-Con (when held sideways).
LeftSR33554432SR button on a Left Joy-Con (when held sideways).
Minus2048Minus (–) button.
Palma268435456Top button on the Poké Ball Plus (Palma) controller.
Plus1024Plus (+) button.
R128R shoulder button.
Right16384D-Pad Right.
RightSL67108864SL button on a Right Joy-Con (when held sideways).
RightSR134217728SR button on a Right Joy-Con (when held sideways).
StickL16Click of the Left Stick.
StickLDown524288Pseudo-button: Left Stick tilted Down past the deadzone.
StickLLeft65536Pseudo-button: Left Stick tilted Left past the deadzone.
StickLRight262144Pseudo-button: Left Stick tilted Right past the deadzone.
StickLUp131072Pseudo-button: Left Stick tilted Up past the deadzone.
StickR32Click of the Right Stick.
StickRDown8388608Pseudo-button: Right Stick tilted Down past the deadzone.
StickRLeft1048576Pseudo-button: Right Stick tilted Left past the deadzone.
StickRRight4194304Pseudo-button: Right Stick tilted Right past the deadzone.
StickRUp2097152Pseudo-button: Right Stick tilted Up past the deadzone.
Up8192D-Pad Up.
Verification536870912Internal "verification" button used during HID input testing.
X4X button (up face button).
Y8Y button (left face button).
ZL256ZL trigger.
ZR512ZR trigger.

On this page