Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyboard shortcuts #39

Open
danielroe opened this issue Nov 24, 2022 · 11 comments
Open

keyboard shortcuts #39

danielroe opened this issue Nov 24, 2022 · 11 comments
Assignees
Labels
c: feature Request for new feature c: parity Parity with Mastodon web app p: 1-normal Nothing urgent

Comments

@danielroe
Copy link
Member

like default mastodon ui + twitter, we can implement shortcuts, e.g. g - n goes to notifications, g - h to home, etc.

@danielroe danielroe added the c: feature Request for new feature label Nov 24, 2022
@Shinigami92 Shinigami92 added the p: 1-normal Nothing urgent label Nov 28, 2022
@sxzz
Copy link
Member

sxzz commented Nov 28, 2022

I prefer to use keyboard shortcuts + hover. For example, I can use a trackpad to move the cursor to a post and press some key (like f), to favorite the post.

@ayoayco
Copy link
Member

ayoayco commented Dec 2, 2022

Will this also add Twitter's 'j' / 'k' hotkeys to go down and up your timeline?

@hartmut-co-uk
Copy link
Collaborator

I prefer to use keyboard shortcuts + hover. For example, I can use a trackpad to move the cursor to a post and press some key (like f), to favorite the post.

👍 as an example -> Linear.app provides such shortcuts + hover as well

@hartmut-co-uk
Copy link
Collaborator

Copy link
Collaborator

I'd be interested in taking this, do we (want to) have a DoD?
Also what about the UI/UX aspects?
And the list of shortcuts we want to support in a first iteration?
Or just take it, start with a POC and see where this goes?

@hartmut-co-uk hartmut-co-uk self-assigned this Dec 2, 2022
@hartmut-co-uk
Copy link
Collaborator

hartmut-co-uk commented Dec 3, 2022

Plan of action, as a first iteration:

  1. add 'Keyboard Shortcuts' modal with instructions
    • open via ? -> shift + ?
    • close modal via shift + ? / esc
  2. add first basic shortcut
    • n / c Compose
  3. add first two sequence navigation shortcuts:
    • g..h Open Home Timeline
    • g..n Open Notifications
  4. use I18n (started off with en-US for prototyping)

hartmut-co-uk added a commit that referenced this issue Dec 4, 2022
hartmut-co-uk added a commit that referenced this issue Dec 5, 2022
hartmut-co-uk added a commit that referenced this issue Dec 6, 2022
hartmut-co-uk added a commit that referenced this issue Dec 7, 2022
..not sure if this is better or even less readable -.-
hartmut-co-uk added a commit that referenced this issue Dec 7, 2022
@forestsystem
Copy link

Thank you for working on this, Hartmut!

I would love to have the option to use keyboard shortcuts. If possible, maybe Elk could improve on Mastodon's functionality, unless there's a reason not to: Mastodon's "j"/"k" keyboard shortcuts to move up and down tweets are pretty much unusable for me. The selected post goes at the bottom of the screen, partially but not completely hidden. This means I only see the bottom of the post above it if it's long. And I use this feature on Tumblr and Twitter mostly to skim more quickly, so it's super unhelpful to have posts jumping around, instead of the top of each post showing up in the same place. :(

It would be really cool for me if Elk did Tumblr/Twitter's version, instead of Mastodon's version!

@AmeliaBR
Copy link

If possible, maybe Elk could improve on Mastodon's functionality

Agreed. The current Mastodon web implementation of keyboard navigation is very broken & should not be used as a template:

  • scroll position is usually wrong (as @forestsystem explained),
  • hijacking of arrow keys means you cannot tweak scroll position or scroll long posts without skipping to the next one,
  • the shortcuts only work if you first get focus into the main feed,
  • expanding conversations or similar actions lose the current place in the feed when you come back to it.

Last I checked, Twitter was pretty good at this (but who knows, it may have broken since). Facebook as well (except that it's easy to end up with focus in a reply box and type "jjj" trying to scroll!).

I would also suggest that you plan for customizable shortcuts from the beginning (i.e., use a dynamic internal map to connect keys with action), so that you can support other languages & keyboard layouts.

You'll also want to work with some screen reader devs to make sure the custom keyboard handling is correctly communicated to the screen reader (which have their own shortcuts).

@boehs boehs added the c: parity Parity with Mastodon web app label Feb 4, 2023
@boehs
Copy link
Member

boehs commented Feb 6, 2023

Recieved request for z for zen mode #1642

@leedo
Copy link

leedo commented Feb 16, 2023

I'm a huge fan of Elk and also keyboard shortcuts :) It would be awesome to have j / k for navigating to next / prev message. I understand these may not be intuitive choices for most, but it seems fairly common in microblogging platforms.

@hartmut-co-uk
Copy link
Collaborator

Hi everyone, I'm planning to pick this up again.
j / k navigation actually is a big challenge to make it work with vue-virtual-scroller.

I'll add z for zen mode to the list.

Please refer to #319 for technical discussions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature c: parity Parity with Mastodon web app p: 1-normal Nothing urgent
Projects
Status: Todo
Development

No branches or pull requests

9 participants