Hello,
is there any way that I can disable the default DELETE and BACKSPACE key action in a textfield, if a certain condition applies?

Something like (pseudo code)....

onevent (keyboard)
{
if (key is backspace || key is delete)
{
if (condition) stopDefaultAction;
else allowDelete;
}
}