onKeyRelease/onKeyUp feature is crucial
```Nim
textBox.onKeyDown = proc(event: KeyBoardEvent) =
    let digit = {'0'..'9'}
    if char(event.key) in digit:
        label.text = "Number can't be name"
        textBox.text = textBox.text[0 .. ^2] #remove last char, as number supposed to be the last char
```
in this code the anonymous function will run when a key event will occur inside the textbox. but the problem is the key char is not yet in `textBox.text` variable and it produces undesire behavior. maybe `onKeyRelease` will be better.

i explored the `nigui.nim` and found another method named `onTextChange`, it partially solve the problem
```Nim
textBox.onTextChange = proc(event: TextChangeEvent) =
    let digit = {'0'..'9'}
    if textBox.text[^1] in digit:
        label.text = "Number can't be name"
        textBox.text = textBox.text[0 .. ^2]
```
partially because the insertion cursor goes in front of the text (index 0), and the `onKeyDown` solution, the pressed char appear in front of everything. i think it is causing because of inserting mechanism.

where to look to find what method `textChangeEvent` has. for example `keyboardEvent` has `key` method.
*textBox `cursorPos` has to be implemented, this can solve the insertion problem*
https://github.com/trustable-code/NiGui/blob/41d7e103c09f23f158afd6df442275cc86a66937/src/nigui.nim#L2382-L2386