miniflux-v2/internal/ui
Robert Lützner facf38955c Add 'Enter' key as a hotkey to open selected item
There are a few things that need to be done, to make this work.

First, we need to register `Enter` as another hotkey that opens the
selected item.

However, by default the `KeyboardHandler` will override all default
actions. That might make sense for any other key, but for the `Enter`
key, we want to keep the default behavior (i.e. follow a selected link
or press a button). So for this single key event, we do not call
`preventDefault()`.

I see this as unproblematic for the following reasons.

1. With the changes from #2348, when we're in a list of items (articles,
   categories, feeds), there is no link selected. This is what made the
   `Enter` key work _implicitly_ in the past. With nothing selected, the
   `Enter` key will do nothing by default.
2. If we have **any** link selected (including when we are in a view
   with a list of selectable items), we'll get the default action of
   `Enter` (i.e. follow a link), which is exactly what we had before.

Lastly, we need to update the list of keyboard shortcuts displayed when
pressing `?`.

This fixes #2366.
2024-02-21 20:02:58 -08:00
..
form
session
static Add 'Enter' key as a hotkey to open selected item 2024-02-21 20:02:58 -08:00
view
about.go
api_key_create.go
api_key_list.go
api_key_remove.go
api_key_save.go
bookmark_entries.go
category_create.go
category_edit.go
category_entries.go
category_entries_all.go
category_feeds.go
category_list.go
category_mark_as_read.go
category_refresh.go
category_remove.go
category_save.go
category_update.go
entry_bookmark.go
entry_category.go
entry_enclosure_save_position.go
entry_feed.go
entry_read.go
entry_save.go
entry_scraper.go
entry_search.go
entry_toggle_bookmark.go
entry_unread.go
entry_update_status.go
feed_edit.go
feed_entries.go
feed_entries_all.go
feed_icon.go
feed_list.go
feed_mark_as_read.go
feed_refresh.go
feed_remove.go
feed_update.go
handler.go
history_entries.go
history_flush.go
integration_pocket.go
integration_show.go
integration_update.go
login_check.go
login_show.go
logout.go
middleware.go
oauth2.go
oauth2_callback.go
oauth2_redirect.go
oauth2_unlink.go
offline.go
opml_export.go
opml_import.go
opml_upload.go
pagination.go
proxy.go
search_entries.go
session_list.go
session_remove.go
settings_show.go
settings_update.go
share.go
shared_entries.go
static_app_icon.go
static_favicon.go
static_javascript.go
static_manifest.go
static_stylesheet.go
subscription_add.go
subscription_bookmarklet.go
subscription_choose.go
subscription_submit.go
ui.go
unread_entries.go
unread_entry_category.go
unread_entry_feed.go
unread_mark_all_read.go
user_create.go
user_edit.go
user_list.go
user_remove.go
user_save.go
user_update.go
webauthn.go