From 8f010fa86339f3a03191557439e110066d5a5af6 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Fri, 14 Nov 2025 23:53:09 +0000 Subject: [PATCH] Add documentation for keyboard shortcuts --- src/SUMMARY.md | 1 + src/users/09-keyboard-shortcuts.md | 82 ++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 src/users/09-keyboard-shortcuts.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index fa2a56de..c102fc91 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -12,6 +12,7 @@ - [Fediverse Interaction](users/06-fediverse-interaction.md) - [Other Features](users/07-other-features.md) - [History of Lemmy](users/08-history-of-lemmy.md) +- [Keyboard Shortcuts](users/09-keyboard-shortcuts.md) # For Admins diff --git a/src/users/09-keyboard-shortcuts.md b/src/users/09-keyboard-shortcuts.md new file mode 100644 index 00000000..9bd154c7 --- /dev/null +++ b/src/users/09-keyboard-shortcuts.md @@ -0,0 +1,82 @@ +# Keyboard Shortcuts + +Lemmy-UI supports keyboard shortcuts for navigation and interaction with posts and comments. + +## Availability + +Keyboard shortcuts work on pages that display posts or comments: +- Home page and community pages +- Individual post pages +- User profiles +- Search results +- Saved posts and comments +- Inbox and mentions +- Moderation queues + +Shortcuts are automatically disabled when typing in input fields or forms. + +## Navigation + +### Post Lists + +Navigate between posts on listing pages. + +| Key | Action | +|-----|--------| +| **j** | Next post | +| **k** | Previous post | +| **J** | Last post | +| **K** | First post | + +The currently selected post is highlighted. You can also click on a post to select it. + +### Comments + +Navigate through comments when viewing a post. + +| Key | Action | +|-----|--------| +| **j** | Next comment (depth-first) | +| **k** | Previous comment | +| **J** | Next sibling (same level) | +| **K** | Previous sibling (same level) | +| **p** | Parent comment | +| **t** | Thread root (top-level comment) | + +## Actions + +Perform actions on the highlighted post or comment. + +| Key | Action | Requires Login | +|-----|--------|----------------| +| **a** | Upvote (toggle) | Yes | +| **z** | Downvote (toggle) | Yes | +| **s** | Save/unsave (toggle) | Yes | +| **x** | Expand post | No | +| **e** | Edit | Yes (own content only) | +| **r** | Reply (comments) / Go to community (posts) | Context-dependent | +| **.** | Open actions menu | No | +| **Enter** | Collapse/expand comment | No | + +**Notes:** +- Voting and save keys toggle - press again to undo +- The `r` key opens the community page when viewing posts, and replies to the comment when viewing comments +- The actions menu (`.`) provides access to additional options like report, block, and moderation actions + +## Links + +Open posts, comments, profiles, and communities. Lowercase keys open in the current tab, uppercase (Shift) opens in a new tab. + +| Key | Action | +|-----|--------| +| **c** / **C** | Open comments | +| **l** / **L** | Open post link | +| **u** / **U** | Open user profile | +| **r** / **R** | Open community | + +## Important Notes + +- Shortcuts are disabled while typing in text inputs, textareas, or forms +- Browser extensions like Vimium may intercept keyboard shortcuts +- Browser-specific shortcuts always take priority +- On mobile, shortcuts only work with external keyboards