The part of gui_input that handles unicode wasn't checking
text_changed_dirty before emitting the signal, unlike the rest of the text editing functions.
Fixes#86451
1. Allow values longer than 1 character in the property,
but trim characters after the first one.
2. Allow empty strings, this acts like if a space was used as a secret character,
so that an error isn't printed when you erase all characters in the property.
The most important issue is LineEdit not consuming
"ui_text_submit" event which makes pressing Enter after
editing escape to other components causing unwanted
interactions.
Also fix handling mouse button interactions not consuming
some events.
Also implement early return in case we know which event
type it is and there is no point in checking other event
types.
PS I'm also suspicious that mouse motion events also need
to be consumed, but haven't explored those cases.
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.
Co-authored-by: Raul Santos <raulsntos@gmail.com>
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.