Keyboard shortcut to show profiles

This commit is contained in:
Kovid Goyal 2024-02-20 21:48:28 +05:30
parent db3401b02b
commit 592dad1194
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 10 additions and 0 deletions

View File

@ -301,6 +301,8 @@ be customised in the viewer :guilabel:`Preferences`. The default shortcuts are l
- Toggle Table of Contents - Toggle Table of Contents
* - :kbd:`Ctrl+S` * - :kbd:`Ctrl+S`
- Read aloud - Read aloud
* - :kbd:`Alt+P`
- Change settings quickly by creating and switching to :guilabel:`profiles`
* - :kbd:`Alt+f` * - :kbd:`Alt+f`
- Follow links with the keyboard - Follow links with the keyboard
* - :kbd:`Ctrl+C` * - :kbd:`Ctrl+C`

View File

@ -314,6 +314,12 @@ def common_shortcuts(): # {{{
_('Show the book metadata') _('Show the book metadata')
), ),
'show_profiles': desc(
v"['Alt+p']",
'ui',
_('Change settings quickly by creating and switching to "profiles"')
),
'reload_book': desc( 'reload_book': desc(
v"['Ctrl+Alt+F5', 'Ctrl+Alt+r']", v"['Ctrl+Alt+F5', 'Ctrl+Alt+r']",
'ui', 'ui',

View File

@ -493,6 +493,8 @@ class View:
ui_operations.toggle_bookmarks() ui_operations.toggle_bookmarks()
else: else:
self.overlay.show_bookmarks() self.overlay.show_bookmarks()
elif data.name is 'show_profiles':
self.overlay.show_profiles()
elif data.name is 'toggle_highlights': elif data.name is 'toggle_highlights':
ui_operations.toggle_highlights() ui_operations.toggle_highlights()
elif data.name is 'new_bookmark': elif data.name is 'new_bookmark':