Add interactivity to your p5.js sketch with mouse and keyboard functions.
Continue your creative coding learning journey with Learn p5.js: Interaction. You'll learn to add interactivity to your p5.js sketch with mouse and keyboard functions.
### Skills you’ll gain
* Track mouse position and events to trigger animations.
* Initiate animations based on the distance between the mouse and visual elements.
* Detect keyboard events to trigger animations.
### Notes on prerequisites
We recommend that you complete [Learn p5.js: Fundamentals](https://www.codecademy.com/learn/learn-p5js-fundamentals) before starting this course.
Continue your creative coding learning journey with Learn p5.js: Interaction. You'll learn to add interactivity to your p5.js sketch with mouse and keyboard functions.
### Skills you’ll gain
* Track mouse position and events to trigger animations.
* Initiate animations based on the distance between the mouse and visual elements.
* Detect keyboard events to trigger animations.
### Notes on prerequisites
We recommend that you complete [Learn p5.js: Fundamentals](https://www.codecademy.com/learn/learn-p5js-fundamentals) before starting this course.