How to detect backspace

I am trying to get user input from a textbox. However, the backspace is proving difficult to work with. When I delete characters with the backspace, I want to capture the new value.
I’m thinking of figuring out a way to detect if a backspace has been clicked and then manually change the text variable (maybe by deleting the last char).

Can anyone show me how to detect if backspace has been clicked or if there is a way to do what I want without all this extra work?

The text area sends LV_EVENT_VALUE_CHANGED each time its value changes. Perhaps that would be more useful than trying to detect individual key presses.

I know but that still doesn’t solve the problem. I need to know when backspace is entered so I can change the variable storing the text in textbox.

LV_EVENT_INSERT is also sent before doing anything with the text area.
See here: