skyjake / lagrange

A Beautiful Gemini Client
https://gmi.skyjake.fi/lagrange/
BSD 2-Clause "Simplified" License
1.21k stars 64 forks source link

Sidebar keyboard navigation #144

Open ERnsTL opened 3 years ago

ERnsTL commented 3 years ago

Observations regarding keyboard navigation:

1) When pressing TAB, it enters the URL entry field. But please a possibility to change to the main viewport navigation again. Maybe using Shift+Tab? 2) Additionally, it seems absent to be able to cycle through links in the main viewport using the keyboard and "click" on them -> goal: enable keyboard navigation. Since Gemini space is structurally simple... 3) It is possible to open sidebar panes using Ctrl+1,2,3,4.. but it is not possible to select an entry within these lists using the keyboard. Expected behavior: up and down arrow keys do not scroll the main viewport, but select within the Ctrl+1,2,3,4... sidebar lists.

If that is already possible, then sorry to create an issue but I have browsed through the Preferences -> Keys list and tried Shift+Tab, Ctrl+Tab and so on.

Expected behavior:

  1. Ctrl+L or Shift+Tab puts the cursor into the URL entry field. Enter URL, Press Enter.
  2. If the page loaded successfully, the focus is automatically moved to the main viewport. If the URL loading is unsuccessful, the cursor stays in the URL entry field and the user can fix a typo or enter another URL. If the user does not change the URL field or just wants to copy (Ctrl+C) it out or does not press Enter key for some other reason, then the user can move out of the URL entry field using simply Tab (or Shift+Tab) to explicitly get back to the main viewport navigation.
  3. Move up and down using the arrow keys to select a part of the Gemini page.
  4. In this visible part of the Gemini page, there are several links visible.
  5. Press tab for cycling through the visible links in the currently visible part of the main viewport window (= cycling not through all the links within the whole page, that could create unexpected large jumps within the Gemini page).
  6. Then press Enter to "click" on that link.

Shift+Tab could be used to cycle between URL entry field, main viewport and sidebar for example.

skyjake commented 3 years ago

When pressing TAB, it enters the URL entry field. But please a possibility to change to the main viewport navigation again. Maybe using Shift+Tab?

Pressing Escape removes input focus from the URL entry.

it seems absent to be able to cycle through links in the main viewport

Correct, there is no way to cycle through individual links. However, two keyboard navigation methods are provided: holding down the Alt key and pressing a number, or pressing F and then pressing a key identifying a link. Links are displayed with numbers/letters that allow selecting them. (Check out the Help document / F1 for more info.)

sidebar panes using Ctrl+1,2,3,4.. but it is not possible to select an entry within these lists using the keyboard.

True, the sidebar is currently not accessible via the keyboard. Bookmarks, history, and identities can be accessed via the quick search feature, though, entering text in the URL input field.

I have been considering making the sidebar keyboard-focusable, but so far it has not been a priority since the quick search provides the most important functionality.

ERnsTL commented 3 years ago

Thanks for your response -- the Escape key is totally fine; Alt+[number] or F + letter is way cooler than cycling using Tab! Much more direct.

Thanks for taking up the feedback on sidebar keyboard navigation -- Greetings and have a great weekend

skyjake commented 2 years ago

The sidebar and all other UI elements will be keyboard-navigable in v1.13.

Links are not focusable via Tab cycling, though, on purpose. The home row shortcuts for opening and hovering on a visible link should be used. This is much more convenient and efficient than Tab cycling.

skyjake commented 2 years ago

There are a few details to improve with the sidebar keyboard navigation: