Friendly examples are provided in the inputs repository.
You can also find them below:
- devices_example.py - lists the devices that have been found on your computer.
- keyboard_example.py - shows an easy way to get keyboard events.
- mouse_example.py - shows an easy way to get mouse events.
- gamepad_example.py - shows an easy way to get gamepad events.
- vibrate_example.py - showing how to get a gamepad to vibrate.
- jstest.py - shows gamepad events in a summary view, in the style of jstest.
There are two examples for the BBC Microbit, see Microbit Gamepad for more details.
- jstest_microbit.py - shows microbit events, in the style of jstest.
- vibrate_microbit.py - an led effect to simulate vibration.
We hope to add more examples in the future.