You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`on_clicked` - on click callback, receives 2 parameters, the click and the `Input` control instance, default NOOP
85
+
*`focused` - Alias for `focussed`
86
+
*`on_clicked` - Deprecated - use `on_click`
87
+
*`on_click` - on click callback, receives 2 parameters, the click and the `Input` control instance, default `NOOP`
86
88
*`on_unhandled_key` - on unhandle key pressed callback, receives 2 parameters, the key and the `Input` control instance, default NOOP. This callback receives keys like `[tab]` and `[enter]`
87
89
*`max_length` - maximum allowed length (Integer), default `false` which disables length checks
88
90
*`fill_from_bottom` - fill the text from the bottom, like for a log or game terminal, default `false`
@@ -112,6 +114,9 @@ The argument list below will list `prompt_color` but not the individual `prompt_
112
114
*`#replace(text)` - Alias for `#insert(text)`
113
115
*`#replace_at(text, start, end = start)` - Alias for `#insert_at(text, start, end = start)`
114
116
*`#append(text)` - Appends text the end of the value, without changing the selection
117
+
*`#delete_forward` - Deletes selection or the character to the right of the cursor location if the selection is empty (typically in response to the `Delete` key)
118
+
*`#delete_back` - Deletes selection or the character to the left of the cursor location if the selection is empty (typically in response to the `Backspace` key)
119
+
*`#current_selection` - Returns the currently selected text
115
120
*`#current_selection` - Returns the currently selected text
116
121
*`#current_line` - Returns the currently selected line object
117
122
*`#current_word` - Returns the word currently under the cursor
@@ -146,11 +151,12 @@ The argument list below will list `prompt_color` but not the individual `prompt_
146
151
*`#focus` - Focusses the instance. Note the instance will only receive the focus after it's rendered. This prevents multiple instances from handling the keyboard and mouse events in the same tick.
147
152
*`#blur` - Removes the focus from the instance. This happens immediately and the instance will not process keyboard and some mouse events after being blurred.
148
153
*`#focussed?` - Returns true if the input is focussed, false otherwise
154
+
*`#focused?` - Alias for `#focussed?`
149
155
*`#value_changed?` - Returns true if the input value changed in the last tick, false otherwise
150
156
151
-
## Special keyboard handling
157
+
## Custom keyboard handling
152
158
153
-
There may be cases where you want to do some special keyboard handling, like filtering out certain characters. In order to do this, create a subclass of `Input::Text` or `Input::Multiline` and override the `handle_keyboard` method, calling `super` when your special handling is done. The following instance variables are available:
159
+
There may be cases where you want to do some custom keyboard handling, like filtering out certain characters. In order to do this, create a subclass of `Input::Text` or `Input::Multiline` and override the `handle_keyboard` method, calling `super` when your special handling is done. The following instance variables are available:
154
160
155
161
*`@meta` - true if the Meta key is down (the Command key on a Mac, or Windows key on Windows)
0 commit comments