13
votes
Accepted
Is the HTML5 Gamepad API limited to only 4 Controllers?
Ok, I've done some extensive research and testing and feel some confidence in answering this.
The Gamepad API spec doesn't define a limit to controllers, as you can see in the linked documentation ...
6
votes
Rumble support with Gamepads?
There’s the Vibration API (see also Editor’s Draft, MDN). That has support in Firefox and Chrome. It is more generally designed for phone vibration than gamepad haptics though, and only supports a ...
4
votes
Accepted
Gamepad API "gamepadconnected" not working
MDN states that "If a gamepad is already connected when the page loaded, the gamepadconnected event is dispatched to the focused page when the user presses a button or moves an axis.". So your page ...
3
votes
HTML5 Gamepad API on Chrome
SPECIAL NOTE: The GamePad API is handled in two completely different ways by Firefox and Google Chrome. Because of this, you need to include code to test for your browser's identity, and handle the ...
3
votes
Simulate gamepad with Puppeteer?
There isn't really a "proper" way to do it.
What I've done is made a somewhat clean way you should be able to use. It essentially involves creating your own game controller management code ...
2
votes
Microsoft Edge does not detect gamepads
Just tested this with the link you gave, my DS4 controller and Edge, seems to work flawless (except from the part where it gets recognized as Xbox) had to install DS4windows though:
http://ds4windows....
2
votes
Accepted
Gamepad API: Button events not firing
Had similar issue. Inspecting the code at gamepad.js/all.js.cofee highlighted that we need to retrieve gamepads from navigator on every update cycle (they don't auto-update), make sure your gameLoop() ...
2
votes
BLE and Bluetooth gamepad options for Oculus
Yes you can use HID over GATT with BLE to control Oculus. At least last time I tried the game Smash Hit with a standard BLE mouse the mouse button did the same thing as the oculus built in button.
2
votes
How to detect joy-con input/motion controls in HTML5 JavaScript
Wei Gao explained this in a React Knowledgeable meetup last week.
You can learn how she did it through her presentation or her slides.
You can visit the talk page for more information.
2
votes
What is the optimum gamepad polling frequency?
You should poll at (at least) 60 Hz to ensure you capture new button/axis state at least once per animation frame. Most apps poll in the requestAnimationFrame loop but this isn't always the best ...
2
votes
How to detect a button press with Gamepad API?
I don't have enough reputation to just add a comment to Caleb Denio's answer, but regarding Nathan's comment on that answer:
I have used your example to listen for 20 buttons and i can detect each ...
1
vote
How to detect a sequence of button press with gamepad api
This isn't supported by the Gamepad API (yet!) but I've drafted a proposal to add events that would make this a lot easier. Currently the only way to do it is how you've done it, poll frequently and ...
1
vote
Is there a fix for the mismapping in the js Gamepad API?
The gamepad mapping is thought to solve this, but right now the only mapping is "standard". Your game should still be playable if you make the game controls customizable (for example, you ...
1
vote
How to customize gamepad controller joystick output sensitivity in Windows 10
Short Answer
Consider using an emulation software (x360, DS4Windows, etc) which causes your input commands to go through an easy to configure software layer. Such software tend to allow tweaking of ...
1
vote
Accepted
How to detect a button press with Gamepad API?
You shouldn't reference the Gamepad object until the gamepadconnected event has been thrown. Also, you'll need a loop to poll the button value. Here's some revised code:
var i = 1;
window....
1
vote
How to view all the raw data that comes from a bluetooth device to your computer?
You could use Wireshark. has a Windows and Linux version.
Capturing Bluetooth isn't that complex. see the Wireshark site for the tutorial.
1
vote
Accepted
Gamepad API not detecting Xbox controller in Chrome on Windows server 2012
On Windows Server 2012, Windows 8, and later Chrome looks for xinput1_4.dll. On earlier versions, it looks for xinput9_1_0.dll.
See XInputDllFileName here:
https://cs.chromium.org/chromium/src/...
1
vote
What is the optimum gamepad polling frequency?
The Gamepad API indeed only supports polling, and your polling frequency is indeed too low.
Assuming you're trying to build a game, the gamepad responsiveness would ideally be as high as the game's ...
1
vote
Accepted
BLE and Bluetooth gamepad options for Oculus
Oculus doesn't support BLE (Bluetooth low energy) controllers!!!
Oculus supports only:
Samsung Gear VR Controller
The Gear VR Controller orientation-tracked input device is the primary Gear VR ...
1
vote
Getting started on custom gamepad handling
HIDGuardian covers your first bullet point:
https://github.com/nefarius/ViGEm/tree/master/Sys/HidGuardian
HIDGuardian is used by InputMapper to hide the physical gamepad when a virtual gamepad has ...
1
vote
Gamepad API "gamepadconnected" not working
Chrome is notorious (certainly to me after working with it!) for its, shall we say, individual implementation of the GamePad API. One issue being that as far as I'm aware, it doesn't yet support the "...
1
vote
Verify ongamepadconnected/disconnected supported by looking for the GamepadEvent Existence
Yes, 'GamepadEvent' in window is a viable feature test.
1
vote
Accepted
Moga gamepad not working with A-Frame
The tracked-controls component is for 6DOF tracked controllers, and won't support arbitrary gamepads. You probably want to try universal-controls or gamepad-controls instead.
1
vote
Is the HTML5 Gamepad API limited to only 4 Controllers?
I found that if I plug in multiple controllers, and then unplug some with lower indexes, on chrome numbering stays even after refresh, while on mozilla numbering stays only until refresh. This makes ...
1
vote
Is the HTML5 Gamepad API limited to only 4 Controllers?
Thus far, every time I've used the GamePad API in Chrome, it's returned an array containing four entries initially. The "About:Help" for my version returns the following information:
Version 59.0....
1
vote
Accepted
How many things gamepad api and hid api differ from each other
As far as the Gamepad API goes, it is originally a Read-Only API. Hence you could make your sensor as one which emits events every few ticks to hack your HID device into acting like a Gamepad.
The ...
1
vote
Accepted
Arduino joystick to web gamepad
I was able to get the single version of the library to work correctly in both Chrome 47 and Firefox 43. The two and three controller versions work correctly in Firefox 43, but in Chrome 47 I see the ...
1
vote
Gamepad API - Different browser axis mapping
User agents are free, according to the spec, to remap buttons if a known configuration is detected. They do not have to, though. You can manually check the mapping and remap in your client-side code, ...
1
vote
Unable to get Gamepad events on Chromium Version 44.0.2383.0
Seems to work for me using this test page:
http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html
Keep in mind that, due to fingerprinting privacy concerns, you to press a ...
1
vote
SharpDX.Direct Input in Unity
We have been developing exotic controller support for a Unity product and encountered the same problem (SharpDXException: HRESULT: [0x80070057]) on the exact same line.
We tried recompiling the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
gamepad-api × 67javascript × 31
gamepad × 24
html × 14
android × 8
google-chrome × 8
firefox × 4
bluetooth × 4
java × 3
c# × 3
hid × 3
webvr × 3
joystick × 3
typescript × 2
unity3d × 2
input × 2
aframe × 2
sharpdx × 2
python × 1
ios × 1
node.js × 1
reactjs × 1
angular × 1
wpf × 1
vb.net × 1