E-book viewer: Allow pressing the delete key to delete the currently selected highlight.

This commit is contained in:
Kovid Goyal 2021-03-14 10:55:06 +05:30
parent 264f6ef885
commit a164265c90
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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