[w3c/gamepad] Handedness of controllers (#30)

For VR controllers (and I'd imagine possibly some others?) it can be useful for developers to know which had the user is holding a controller in. I had planned to maybe bake this into the gamepad name ("Oculus Touch Left") but there's also device like the Vive wands that can switch which hand they're detected as dynamically. For that reason and developer convenience I'd like to propose a handedness enum:

```
enum GamepadHand {
    "", // Both hands or unknown
    "left",
    "right",
};

partial interface Gamepad {
    GamepadHand hand; // The hand the controller is held in
};
```

Most gamepads would use the empty string because handedness is not really meaningful for them (which also makes it an easy default.) Only controllers that have a concept of handedness would need to set this to `left` or `right` specifically.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/issues/30

Received on Friday, 5 August 2016 17:55:51 UTC