I want to test this condition if the key event is backspace or not:
if (key.match(/[\b]/)) {
return true;
}
where key
is coming from keystroke. (like 'a', '6' , '.'
etc)
What should be the value of key
for if
condition to return true
?
I tried key
as '.'
since it is a word boundary (But only with a word, sadly). What should be the key to show backspace <-
.