widgets: added key-pressed and key-released callbacks to all text input components (#7081)

* widgets: removed rejected event
* widgets: added key-pressed, key-released callbacks to text input components
* Update docs/astro/src/content/docs/reference/std-widgets/lineedit.mdx
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

---------

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
This commit is contained in:
FloVanGH 2024-12-12 17:20:45 +01:00 committed by GitHub
parent c0f346fdf7
commit e0ad561c86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 147 additions and 53 deletions

View file

@ -15,8 +15,9 @@ export component LineEdit {
in-out property <string> text <=> base.text;
callback accepted <=> base.accepted;
callback rejected <=> base.rejected;
callback edited <=> base.edited;
callback key-pressed <=> base.key-pressed;
callback key-released <=> base.key-released;
accessible-role: text-input;
accessible-enabled: root.enabled;
accessible-value <=> text;

View file

@ -22,7 +22,8 @@ export component TextEdit {
in-out property <length> viewport-height <=> base.viewport-height;
callback edited <=> base.edited;
callback rejected <=> base.rejected;
callback key-pressed <=> base.key-pressed;
callback key-released <=> base.key-released;
accessible-role: AccessibleRole.text-input;
accessible-enabled: root.enabled;