The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". This cookie is set by GDPR Cookie Consent plugin. These cookies ensure basic functionalities and security features of the website, anonymously. To stop using the keyboard control, press again.Necessary cookies are absolutely essential for the website to function properly. You will be prompted to press to bind the keyboard to the controller. Macros persist after exiting each Joycontrol session.įirst, to control your Nintento Switch using the keyboard attached to your pi, use the command: cmd> keyboard I went ahead and added a few more commands that allow you to control the Switch directly by binding the controls to the keyboard, to record this keyboard control, to play it back like a macro, and to delete unwanted macros. While all these cli commands are fun to play around with, they don’t quite provide the functionality that I’m looking for. This presses the “a” button every 5 seconds until you hit. You can “mash” a single button until you choose to stop by using the command: cmd> mash a 5 It will stay in this state until you reset the joystick to the neutral ‘center’ position by sending the command: cmd> stick left center
This command sets the left joystick to its furthest “right” position. The joysticks are less convenient to use via the CLI, but you can set them like so: cmd> stick left right You can chain multiple button presses together using “&”: cmd> zl&zr Starting with the basics, you can emulate the press of any individual button by simply typing in the label for that button and pressing enter.
Saved recordings can be replayed using cmd > recording_playback
Once you’re back on the Nintendo Switch home screen, type help into the CLI and hit enter. run_controller_cli.py PRO_CONTROLLER again to reconnect. If you send too many “A” commands, you will immediately re-enter the “change grip/order” screen and the Pi will be disconnected from the switch. Once your first “A” command is recognized, you will return to the Controllers menu. The first few button presses can take a moment to take hold, so be patient and wait for a response even if you see the “cmd>” prompt. Press enter and wait until the Switch responds. At this point, you’re connected and ready to input commands into the CLI. This can sometimes take a moment or two, but eventually you’ll see “cmd>” printed in in the terminal. A bunch of info will be printed out to your terminal on the Pi.