diff --git a/bin/darkwallet/src/ui/editbox.rs b/bin/darkwallet/src/ui/editbox.rs index 91bebabe7..3bc06ab83 100644 --- a/bin/darkwallet/src/ui/editbox.rs +++ b/bin/darkwallet/src/ui/editbox.rs @@ -965,6 +965,17 @@ impl EditBox { self.apply_cursor_scrolling(); self.redraw().await; } + KeyCode::Home => { + self.cursor_pos.set(0); + self.apply_cursor_scrolling(); + self.redraw().await; + } + KeyCode::End => { + let glyphs_len = self.glyphs.lock().unwrap().len(); + self.cursor_pos.set(glyphs_len as u32); + self.apply_cursor_scrolling(); + self.redraw().await; + } _ => {} } } @@ -1252,4 +1263,6 @@ static ALLOWED_KEYCODES: &'static [KeyCode] = &[ KeyCode::KpEnter, KeyCode::Delete, KeyCode::Backspace, + KeyCode::Home, + KeyCode::End, ];