From 8702b759b196cf42289e18f650747f9d77954dea Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 8 Jul 2021 08:44:11 +0530 Subject: [PATCH] Fix #1934685 [[Enhancement - Content server] Add shortcuts to actions in the Book details page and display them in the tooltips](https://bugs.launchpad.net/calibre/+bug/1934685) --- src/pyj/book_list/book_details.pyj | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pyj/book_list/book_details.pyj b/src/pyj/book_list/book_details.pyj index dbd62a5407..446f86a149 100644 --- a/src/pyj/book_list/book_details.pyj +++ b/src/pyj/book_list/book_details.pyj @@ -556,8 +556,8 @@ def add_top_bar_buttons(container_id): container = document.getElementById(container_id) if container: clear_buttons(container) - add_button(container, 'convert', action=convert_book, tooltip=_('Convert this book to another format')) - add_button(container, 'edit', action=edit_metadata, tooltip=_('Edit the metadata for this book')) + add_button(container, 'convert', action=convert_book, tooltip=_('Convert this book to another format [C]')) + add_button(container, 'edit', action=edit_metadata, tooltip=_('Edit the metadata for this book [E]')) add_button(container, 'trash', action=delete_book, tooltip=_('Delete this book')) book_id = parse_url_params().book_id if book_id is '0': @@ -724,6 +724,10 @@ def onkeydown(container_id, close_action, ev): delete_book() elif ev.key is 'v' or ev.key is 'V': read_book(render_book.book_id) + elif ev.key is 'c' or ev.key is 'C': + convert_book() + elif ev.key is 'e' or ev.key is 'E': + edit_metadata() def init(container_id):