[−][src]Static p5_sys::global::input
pub static input: InputInternalType
The .input() function is called when any user input is detected with an element. The input event is often used to detect keystrokes in a input element, or changes on a slider element. This can be used to attach an element specific event listener.
Examples
// Open your console to see the output
function setup() {
let inp = createInput('');
inp.input(myInputEvent);
}
function myInputEvent() {
console.log('you are typing: ', this.value());
}
Parameters
fxn
function to be fired when any user input is
detected within the element.
if false is passed instead, the previously
firing function will no longer fire.