I am trying to create a wx.TextCtrl that only accepts certain keys. I have created a validation function, and binded my TextCtrl to that function using wx.EVT\_CHAR. The function is working fine, unless I try to press accent keys (´, `, ~, ¨, ^). I put a `print(event)` on the beggining of the validation function to try and debug it, but nothing gets printed when I press one of these keys. The event is just not triggered.

I also tried wx.EVT\_KEY\_DOWN, but it does not trigger as well.

```py
self.foo_input = wx.TextCtrl(self, size=(150, -1))
self.foo_input.Bind(wx.EVT_CHAR, lambda event: validation_foo(event, foo_params))

```

Here is the validation function (consider validation foo as this):

```py
import wx

def validate_number_key_press(event,
                              negative=False,
                              decimal=False,
                              scientific_notation=False,
                              imaginary=False,
                              decimal_separator='.'):
    key_code = event.GetUnicodeKey()

    print(event)  # for debug
    if ord('0') <= key_code <= ord('9'):
        event.Skip()
        return

    if negative and key_code == ord('-'):
        event.Skip()
        return

    if decimal and key_code == ord(decimal_separator):
        event.Skip()
        return

    if scientific_notation and key_code == ord('e'):
        event.Skip()
        return

    if imaginary and key_code == ord('j'):
        event.Skip()
        return

    # Navigation and deletion
    if key_code in (wx.WXK_BACK, wx.WXK_DELETE, wx.WXK_NUMPAD_DELETE, wx.WXK_TAB, wx.WXK_NUMPAD_TAB, wx.WXK_LEFT, wx.WXK_RIGHT, wx.WXK_NUMPAD_LEFT, wx.WXK_NUMPAD_RIGHT, wx.WXK_HOME, wx.WXK_NUMPAD_HOME, wx.WXK_END, wx.WXK_NUMPAD_END):
        print('Navigation and deletion')  # for debug
        event.Skip()
        return

    return

```