From a164265c905acb2f157daaad888b03d3999fcc3d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 14 Mar 2021 10:55:06 +0530 Subject: [PATCH] E-book viewer: Allow pressing the delete key to delete the currently selected highlight. --- src/pyj/read_book/selection_bar.pyj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pyj/read_book/selection_bar.pyj b/src/pyj/read_book/selection_bar.pyj index df8273bd8e..b01b6ab5e3 100644 --- a/src/pyj/read_book/selection_bar.pyj +++ b/src/pyj/read_book/selection_bar.pyj @@ -566,6 +566,9 @@ class SelectionBar: if ev.key is 'Escape': self.clear_selection() return + if ev.key is 'Delete': + self.remove_highlight() + return if ev.key and ev.key.toLowerCase() is 'c' and ev.ctrlKey: self.copy_to_clipboard() return