PICO-8: Using Buttons
This is a very simple, self-explanatory cart that demonstrates how to use buttons in PICO-8. Just run the cart and the information on the screen shows how the code works. (The source code of this cart isn't intended to be used, just what you see when you run the cart, but source code has been commented anyway in case you want to dive in.)
Save this file to your PICO-8 carts folder. Then load it by typing
load buttons in the command line mode of PICO-8.