SetupActivity: <CTRL+E> as <DEL>

This commit is contained in:
ChristianVisintin
2020-12-25 19:38:17 +01:00
parent 16a011e81e
commit 46ee01e073
2 changed files with 19 additions and 0 deletions

View File

@@ -120,6 +120,15 @@ impl SetupActivity {
if key.modifiers.intersects(KeyModifiers::CONTROL) {
// Match char
match ch {
'e' | 'E' => {
// Prompt to delete selected key
self.yesno_opt = YesNoDialogOption::No; // Default to no
self.popup = Some(Popup::YesNo(
String::from("Delete key?"),
Self::callback_delete_ssh_key,
Self::callback_nothing_to_do,
));
}
'h' | 'H' => {
// Show help
self.popup = Some(Popup::Help);