LibreraReader icon indicating copy to clipboard operation
LibreraReader copied to clipboard

Keyboard and Controllers not fully supported

Open SermanGavin opened this issue 1 year ago • 1 comments

Use case: Ability to turn pages using wireless/wired keyboard or a Bluetooth controller (e.g., Xbox, PS5, Switch). This supports assistive technology and users unable or impaired in using touchscreens.

Issue: Currently unable to turn pages using a physical keyboard or Bluetooth controller. Without first selecting all pages in a highlight mode.

Workarounds: The user muse open the book, then press TAB to highlight all pages. This selection changes text and background colors. Once highlighted, users can navigate pages using the left and right arrows. However, this highlighting and color change persist across all pages.

Expected behaviour: After opening a book using a keyboard or controller, users should be able to navigate pages directly using the left and right arrows without needing to press TAB to highlight pages.

Suggested improvements

  1. Enhanced Navigation: Enable page navigation using left and right arrow keys immediately after opening a book.
  2. Consistent Functionality: Expand keyboard bindings to include common features.
  3. Documentation: Publish a list of keybindings for reference.

Current Keybindings: When a book is open, the following keyboard bindings are available (others may exist):

  • M: Bring up top bar and status bar
  • T: TTS settings
  • S: Find menu
  • L: Library
  • C: Contents
  • B: Bookmark menu (Note: The app closes when using tab and enter to select quick bookmark, this is not the case when using touchscreen)
  • TAB: Navigate through menu options or highlight all pages for arrow navigation
  • Number row: Navigate to pages 1 to 0 (Note: This does not seem to be a helpful)

Suggested Keybindings: In addition to current keybindings, consider adding:

  • D: Toggle day and night mode
  • P: Preferences menu
  • X: Exit menu
  • Q: Add quick bookmark at current page (simulate long press on bookmark button)
  • Up/Down: Adjust brightness
  • PageUp/PageDown: Jump between bookmarks

SermanGavin avatar Jul 21 '24 02:07 SermanGavin

I am using a keyboard through scrcpy. I find that Tab and Shift-tab works for page navigation without any special effort. My reader mode is "full-screen". However, it's a surprising enough key choice that I only tried it after reading your comments!

I haven't tried Librera with a book that has links/footnotes/references but I would normally expect tab to navigate the links within a page which are then opened by pressing enter.

I am surprised that more common keys do not navigate pages e.g.

  • cursor left / right
  • cursor up / down
  • page-up / page-down
  • space-bar / shift-space-bar

When none of those did anything I assumed there was no keyboard support at all.

I like that librera doesn't skimp on settings. Ideally the key-map would be editable because page/chapter/bookmark navigation preferences likely differ.

Some standard pc type key mappings I would appreciate include:

  • tab - navigate links/refs in page
  • enter - open current/first link in page
  • escape - toggle the reader mode shade
  • ctrl-f - search

Feedback on @SermanGavin's suggestions:

  • D: Toggle day and night mode
    • good
  • P: Preferences menu
    • good
  • X: Exit menu
    • I'm happy that escape currently works for this
  • Q: Add quick bookmark at current page (simulate long press on bookmark button)
    • makes sense to be shortcut - q makes me think of quit type actions
    • ctrl-d - is the web-browser norm - weird but has persisted for decades
  • Up/Down: Adjust brightness
    • not for me - I'd want a navigation action
  • PageUp/PageDown: Jump between bookmarks
    • I don't use bookmarks so I'd prefer a different navigation action

duncanawoods avatar Aug 25 '24 07:08 duncanawoods

I can use the arrow keys and Tab/Tab+Shift to navigate pages. Also PageUp and PageDown work for me.

However, when I have both "Navigate with volume buttons" and "Reverse buttons" enabled, then also the arrow keys are reversed. I did not expect that, is this intended?

Here is the twist though: If I press Tab once, the arrow keys are reversed back, so they work as expected. The volume buttons stay in reversed state. This is my preferred state.

redtrumpet avatar Aug 31 '25 12:08 redtrumpet