Custom Keypad CANCEL button does not work

Your regex does not allow empty values so you can’t cancel it.
Surround regex with ( and )? as shown at the ending part of this tutorial.