examples: clear textinput on enter
This commit is contained in:
parent
8a5fe1a8ab
commit
d40fb7cbdb
1 changed files with 2 additions and 0 deletions
|
@ -77,6 +77,8 @@ pub fn main() !void {
|
|||
vx.queueRefresh();
|
||||
} else if (key.matches('n', .{ .ctrl = true })) {
|
||||
try vx.notify("vaxis", "hello from vaxis");
|
||||
} else if (key.matches(vaxis.Key.enter, .{})) {
|
||||
text_input.clearAndFree();
|
||||
} else {
|
||||
try text_input.update(.{ .key_press = key });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue