Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamepad support #154

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Gamepad support #154

wants to merge 5 commits into from

Conversation

jag-k
Copy link
Contributor

@jag-k jag-k commented Jan 12, 2022

Instruction

This plugin focused to use Joy-Cons like "clicker" based on Gamepad API. But if you have other gamepads (like: DualShock 3, DualShock 4 DualSense, XBox 360 Controller, XBox Wireless Controller, etc.) you can use this plugin.

How to install?

The simplest option is download modified Shower Template archive (shower.zip)

How to connect gamepad?

So simple! Just connect your gamepad to your device via Bluetooth or USB, open the presentation and press any button on controller.

How to control?

Joy-cons mapping

Nintendo Switch Joy-Con Controllers
Nintendo Switch Joy-Con Controllers

This mapping assumes that you are holding the Joy-Cons upright, like on image above:

For Right Joy-Con:

Action Buttons Sticks
Next slide A X SR ZR Up and Right
Previous slide B Y SL R Down and Left
Toggle full-screen mode Plus Stick
Exit full-screen mode Home1

For Left Joy-Con:

Action Buttons Sticks
Next slide Up Right SL ZL Up and Right
Previous slide Down Left SR L Down and Left
Toggle full-screen mode Minus Stick
Exit full-screen mode Screenshot

XBox-like mapping

XBox Wireless Controller
XBox Wireless Controller

This mapping for XBox 360 Controller, XBox Wireless Controller, and other XBox-like controllers.

Action Buttons Sticks
Next slide A X LT RT Up Right Up and Right on each stick
Previous slide B Y LB RB Bottom Left Down and Left on each stick
Toggle full-screen mode Select Start Left Stick Rigth Stick
Exit full-screen mode Home/XBox1

DualShock-like mapping

DualSense
DualSense

This mapping for DualShock 3/4, DualSense, and other DualShock-like controllers.

Action Buttons Sticks
Next slide ✖ (Cross) ■ (Square) L2 R2 Up Right Up and Right on each stick
Previous slide ⬤ (Circle) ▲ (Triangle) L1 R1 Bottom Left Down and Left on each stick
Toggle full-screen mode Select Start LStick RStick
Exit full-screen mode Home/PS1

Other gamepads

If your gamepad so specific, you also use this plugin!

For this case, you can check mapping your gamepad on this site (luser.github.io/gamepadtest) or in Gamepad W3C Working Draft by this image:

Standard Gamepad Layout
Standard Gamepad Layout
Action Buttons (by index) Axes
Next slide 0 2 6 7 12 15 Each axes > 0.72
Previous slide 1 3 4 5 13 14 Each axes < -0.72
Toggle full-screen mode 8 9 10 11
Exit full-screen mode 161

NOTE: Each 2n+1 axes inverted. Example on axes[1]:

Vertical axis for left stick (negative up/positive down) => Vertical axis for left stick (negative down/positive up)

Footnotes

  1. On macOS maybe opening Launchpad with Games folder or opening Steam Big Picture on any platform 2 3 4

  2. Each 2n+1 axes inverted. Example on axes[1]: Vertical axis for left stick (negative up/positive down)
    => Vertical axis for left stick (negative down/positive up) 2

@pepelsbey
Copy link
Contributor

pepelsbey commented Jan 12, 2022

Looks great, can wait to try it out :) Still waiting for my Joy-Con to arrive. Quick note: I’d remove all commented console.logs. They were clearly used for debugging purpose and are not needed anymore. Don’t you think?

@jag-k
Copy link
Contributor Author

jag-k commented Jan 12, 2022

Oh, I'm sorry, I'm forgot remove this "feature")

@jag-k jag-k changed the title Gamepad support rer Feb 17, 2022
@jag-k jag-k changed the title rer Gamepad support Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants