diff --git a/src/pyj/read_book/shortcuts.pyj b/src/pyj/read_book/shortcuts.pyj index 1365756b2d..6273d099e1 100644 --- a/src/pyj/read_book/shortcuts.pyj +++ b/src/pyj/read_book/shortcuts.pyj @@ -4,6 +4,8 @@ from __python__ import bound_methods, hash_literals from gettext import gettext as _ +from read_book.globals import runtime + def parse_key_repr(sc): parts = sc.split('+') @@ -363,6 +365,14 @@ def shortcuts_definition(): ), } + + if not runtime.is_standalone_viewer: + ans['sync_book'] = desc( + v"[]", + 'ui', + _('Sync last read position/annotations'), + ) + return ans diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index de78a140b6..839c418e80 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -530,6 +530,8 @@ class View: self.toggle_read_aloud() elif data.name is 'reload_book': ui_operations.reload_book() + elif data.name is 'sync_book': + self.overlay.sync_book() elif data.name is 'next_section': self.on_next_section({'forward': True}) elif data.name is 'previous_section':