Are you using this library?
If so, use the ‘attachFunction()’ method to attach a callback function. Your callback will be called on every loop in ‘getKey()’ while it’s waiting. If you need to bail out, your callback should set ‘MultitapKeypad::isCanceled = true’.