Using Command base system

so… I’m trying to use the new command base system, so I’ve gone through the cookbook thing. I don’t understand how to make a button on a controller link to a command. The cookbook uses a button class that isn’t in the library, so how does this work?

It sounds like you’re looking for the classes in wpilibj.buttons

Button js1_button1 = new JoystickButton(js1, 1); // Create a Joystick Button, arguments sent to the constructor are (stickObject, button number)

js1_button1.whileHeld(new CommandHere()); or js1_button1.whenPressed(new CommandHere()); // buttonObject.whileHeld, whenPressed, or whenReleased (new Command Name());