Use alt+arrow rather than arrow on for next book on book details page

This commit is contained in:
Kovid Goyal 2021-03-26 16:44:25 +05:30
parent e895b4ebde
commit ad3aab9bdd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -707,14 +707,15 @@ def check_for_books_loaded():
def onkeydown(container_id, close_action, ev): def onkeydown(container_id, close_action, ev):
if render_book.book_id: if render_book.book_id:
if not ev.altKey and not ev.ctrlKey and not ev.metaKey and not ev.shiftKey: if ev.altKey:
if ev.key is 'ArrowLeft': if ev.key is 'ArrowLeft':
next_book(render_book.book_id, -1) next_book(render_book.book_id, -1)
ev.preventDefault(), ev.stopPropagation() ev.preventDefault(), ev.stopPropagation()
elif ev.key is 'ArrowRight': elif ev.key is 'ArrowRight':
next_book(render_book.book_id, 1) next_book(render_book.book_id, 1)
ev.preventDefault(), ev.stopPropagation() ev.preventDefault(), ev.stopPropagation()
elif ev.key is 'Escape': elif not ev.ctrlKey and not ev.metaKey and not ev.shiftKey:
if ev.key is 'Escape':
ev.preventDefault(), ev.stopPropagation() ev.preventDefault(), ev.stopPropagation()
close_action() close_action()
elif ev.key is 'Delete': elif ev.key is 'Delete':