I don't claim that my fix is perfect it is just workaround on windows for processing Right Alt key + A key.
In this situation unity produce Event with Event.modifiers set to EventModifiers.Alt and EventModifiers.Control ... which should be only EventModifiers.Alt (i assume this is a Unity bug) so it is recognized by UIInput as unintended Control + A which selects whole text and overits it with "ą" letter, so application of UIInput as chat input is quite problematic that entering "ą" will delete all you message.
Proposed fix tries to discover situation when Right Alt is held (of course it cannot distinguish between Control + Alt and Right Alt) and considers control as not held which is true in this situation because only Right Alt is held not a control.
If you don't find betted way, maybe better is to fix this in KayCode.A section like this:
...
// Select all
case KeyCode.A:
{
if (ctrl && (ev.modifiers & EventModifiers.Alt) == 0) /// <===== added chack for ALT key not held
{
ev.Use();
mSelectionStart = 0;
mSelectionEnd = mValue.Length;
UpdateLabel();
}
return true;
}
...