Support Home and End keys for TextInput
This commit is contained in:
parent
ef987ae2ec
commit
7c8799e493
1 changed files with 6 additions and 0 deletions
|
|
@ -238,6 +238,12 @@ where
|
||||||
keyboard::KeyCode::Right => {
|
keyboard::KeyCode::Right => {
|
||||||
self.state.move_cursor_right(&self.value);
|
self.state.move_cursor_right(&self.value);
|
||||||
}
|
}
|
||||||
|
keyboard::KeyCode::Home => {
|
||||||
|
self.state.cursor_position = 0;
|
||||||
|
}
|
||||||
|
keyboard::KeyCode::End => {
|
||||||
|
self.state.move_cursor_to_end(&self.value);
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
_ => {}
|
_ => {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue