Options

beforeInputUpdate

Executes the callback function before an input is about to be updated. This allows you to intercept and potentially modify input changes before they are applied.

let keyboard = new SimpleKeyboard({ beforeInputUpdate: (instance) => { console.log('About to update input'); console.log('Current input:', instance.getInput()); // You can perform validation or modifications here // before the input is actually updated } }); // This callback is triggered before any input change // giving you a chance to validate or modify the update