Now that we've opened the keyboard issue, what about the <Left> and <Right> -keys ?
And another matter : if there is some text in the textbox, and the text is highlighted (=selected), then selstart = 0, so you cannot use the Backspace>. In that case, this.SelLength > 0, so now we have the...