Questions tagged [gamepad-api]

The Gamepad specification defines a low-level interface that represents gamepad devices.

The Gamepad specification defines a low-level interface that represents gamepad devices. The Web Gamepad API presents a way to access and use gamepads and other controllers for games. For more information see this: https://wiki.mozilla.org/GamepadAPI

78 questions
0
votes
0 answers

how to read gamepad state in Chrome without creating a new object every time?

Chrome does not update the obj returned by navigator.getGamepads(), it is just a snapshot of the state of the gamepad at the moment it was called. So the value of .pressed, .value and .axes never change. Same problem in browsers related to Chrome…
Diego
  • 569
  • 1
  • 9
  • 28
0
votes
1 answer

Is there a way to detect motion controls in JavaScript?

Is there a way to detect motion controls from a JoyCon in vanilla JavaScript? If it's not possible, would I be able to use another API besides Gamepad API? window.addEventListener("gamepadconnect", function(e) { //How would I detect motion…
noname
  • 291
  • 1
  • 12
0
votes
1 answer

HTML5 Gamepad API TypeError

I'm trying to write some code to get a gamepad and list the axes' position: window.addEventListener("gamepadconnected", (e) => { console.log("Gamepad connected at index %d: %s. %d buttons, %d axes.", …
beackers
  • 15
  • 1
  • 7
0
votes
1 answer

Using the standard gamePad code, not finding sound files even though the path name is correct?

Using the standard gamePad code, not finding sound files even though the path name is correct? I have definitely researched this question. For sure, I have found code on SO claiming to solve this dilemma, but this published code doesn't. I am…
user19147296
0
votes
1 answer

Within the GameController API, is continuously polling of navigator.getGamepads() required?

EDITED at end! Within the GameController API, is continuously polling of navigator.getGamepads() required? I ask because my single call to this function returns a length = 0. According to my Mac’s Bluetooth System Preferences my Nimbus+ game pad is…
user19147296
0
votes
1 answer

Using gamepad-api via events, rather than polling

I am building a chrome extension that would enable the use of my 3d-mouse (made by 3d connexion) to scroll web pages. The built-in 3d connexion drivers are worthless, and the 3d mouse presents itself as a 2 button, 6 axis gamepad to the OS. The…
Oren Pinsky
  • 419
  • 3
  • 19
0
votes
1 answer

How to read gamepad values in the playstation browser using usb, bluetooth or gamepad api?

I tried connecting the gamepad with the ps browser, but the browser gives me an error, that navigator.bluetooth and navigator.usb are undefined. It's easier to connect the gamepad with the chrome browser and read the values afterwards. I thought of…
0
votes
1 answer

Android 12 DualSense/ DualShock support via Bluetooth

Android 12 added some new nice features to the controller API like rumble support. In Android 12 it's also possible to process the gyroscope and touchpad inputs from a DualSense/ DualShock controller via Bluetooth. How can an app process touchpad…
grill2010
  • 574
  • 6
  • 23
0
votes
1 answer

SpaceMouse Compact not working with js Gamepad api in Chrome on Ubuntu

As the title suggests I have a problem with using SpaceMouse in Chrome on Ubuntu. On Windows 10 it works fine. I've tried installing 3DxWare 10 and spacenavd but it still does not work. It is worth mentioning that the mouse works with Gazebo…
0
votes
1 answer

How to customize gamepad controller joystick output sensitivity in Windows 10

I've been searching extensively for a way to change the sensitivity of my gamepads in Windows. In most games the joystick sensitivity is too high, so unless I very carefully and gently press the joystick, it's always sending a maxed output so my…
0
votes
1 answer

ViGEm.NET namespace missing when using Unity?

[this question has the unity3d tag and I can't change it to unity2d] I was trying to use ViGEm using this tutorial to help me. But when I was writing the code, a red underline appeared on using Nefarius.ViGEm.Client; It said: The type or namespace…
NOT_A_ROBOT
  • 113
  • 1
  • 15
0
votes
0 answers

How to receive messages from Xbox gamepad in uwp?

I know that I can get the button status through the method under Windows.Gaming.Input, but I can't get the USB command sent by the gamepad, because the gamepad has some non-standard functions, such as multiple key mappings, I need to get the current…
Victor
  • 141
  • 1
  • 11
0
votes
1 answer

HTML5 GamePad API returning inccorect or stuck axes

I am having a problem where when I am using the html5 gamepad API and are polling Gamepad.axes for the controllers trigger values occasionally (usually when I give the controller a bunch of random inputs) the values in the axes array will become…
0
votes
1 answer

How do I differentiate two gamepads of the same type?

I have two gamepads that are connected via usb and they are of the same exact type. How do I differentiate them when they have the same fields? I could use index, but what happens when I connect them again to the computer those indexes might be…
Shai UI
  • 50,568
  • 73
  • 204
  • 309
0
votes
2 answers

How to view all the raw data that comes from a bluetooth device to your computer?

I have a gamepad with giroscope that works with Nintendo Switch, but there is no such feature for windows, but I think that the gamepad anyway send the information from giroscope but windows don't respond to it.