From d07f6700c7b35d3a6969f97a5704901460f5f5da Mon Sep 17 00:00:00 2001 From: Sahil Date: Fri, 8 Jul 2022 18:23:42 +0530 Subject: [PATCH] Add support for ctrl+h as backspace --- egui/src/widgets/text_edit/builder.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/egui/src/widgets/text_edit/builder.rs b/egui/src/widgets/text_edit/builder.rs index e11c44d9be6..d47b48f1d65 100644 --- a/egui/src/widgets/text_edit/builder.rs +++ b/egui/src/widgets/text_edit/builder.rs @@ -1090,6 +1090,11 @@ fn on_key_press( None } + Key::H if modifiers.ctrl => { + let ccursor = delete_previous_char(text, cursor_range.primary.ccursor); + Some(CCursorRange::one(ccursor)) + } + Key::K if modifiers.ctrl => { let ccursor = delete_paragraph_after_cursor(text, galley, cursor_range); Some(CCursorRange::one(ccursor))