alexandrite icon indicating copy to clipboard operation
alexandrite copied to clipboard

Keyboard Navigation

Open diego-carrera opened this issue 2 years ago • 15 comments

It would be great to have some sort of keyboard navigation.

  • Navigate to Previous and Next Post
  • Expand images or content
  • Open comments
  • Go to the linked content

diego-carrera avatar Jul 20 '23 17:07 diego-carrera

Navigate to Previous and Next Post would be awesome!

Maybe also a shorcut to open the sidebar/navigation bar?

adrianzech avatar Jul 21 '23 06:07 adrianzech

I hope we can hold ctrl with left click to open the new thread in new tab like default lemmy.

dnet890 avatar Jul 30 '23 10:07 dnet890

@dtantono Good catch, I'll add some code to make sure I'm not interfering with the ctrl+click functionality. In the meantime you can click down the scroll wheel on your mouse or right click and hit 'Open in new tab' to do that.

sheodox avatar Jul 30 '23 17:07 sheodox

+1 for me on this

Keyboard navigation is one of my most missed features of RES since moving to Lemmy, this would be amazing.

barelylit avatar Aug 05 '23 15:08 barelylit

What sort of hotkeys were you all thinking? Like which keys should do what. I surprisingly never really looked into the hotkeys for reddit/RES.

sheodox avatar Aug 09 '23 02:08 sheodox

Next post / previous post expand / close next / last image in a gallery go to comments were my main ones.

Here's all the ones in RES

image image

barelylit avatar Aug 09 '23 07:08 barelylit

I just added a handful of hotkeys. You can see what ones I have on the new hotkey help page. I'll likely add some more over time, but some basic ones are in there now!

sheodox avatar Aug 09 '23 22:08 sheodox

Dont seem to be working here on Brave or Chrome,

J and K intermittently make things jump about, but no coherent movement between posts

barelylit avatar Aug 11 '23 17:08 barelylit

@barelylit I just tried Chrome and it's working fine for me. Could you share a video of what you're seeing?

sheodox avatar Aug 11 '23 18:08 sheodox

Also note, that when a post is open and focus is somewhere in the post (column or overlay) j and k will jump between comments instead.

sheodox avatar Aug 11 '23 18:08 sheodox

So it seems to be that if there is a sticky post, that is locking it, till you keyboard down arrow past it then hot keys work as expected

I'm hitting J here constantly, at the start but it has no effect till ive scrolled past the sticky posts.

https://github.com/sheodox/alexandrite/assets/101836977/2b14c18d-4003-404c-8efe-28601cabf701

barelylit avatar Aug 11 '23 19:08 barelylit

Actually, doesnt have to be a sticky post, just have to be scrolled down past the first post before it activates

barelylit avatar Aug 11 '23 19:08 barelylit

Would it be possible to move the comments and posts to different keys? Let me explain a little

In RES, you could hit X which would expando the cotent, as that was the only option on reddit. Then you could just hit J / K and move up and down, and it would close the last one and open the next one, in expando. A single key could get you down an entire page of content. At the bottom you could hit G -> N and go to the next page - hit X to expand the next one, and go down that page, one post at a time just hitting J

However with the columns view on Alexandrite, when you hit J and then Enter to open it in the column, you have to then hit ESC to get back to the posts to J down to the next one as J as been taken over for the comments.

Lets say comment navigation was moved to I and O, so one key up the board. Then you could just J down each post, it replacing the last in the column if it had been opened, and then if you did want to move through the comments then I and could be used

This would make for much better browsing, imo

barelylit avatar Aug 14 '23 15:08 barelylit

What is really also needed is just settings that let you change the keyboard navigation keys. i'm on dvorak and a lot of it is nonsense on this layout.

Kommynct avatar Apr 04 '24 02:04 Kommynct

Agreed. Any updates? Edit: I'd also love to see greater functionality for navigating on keyboard overall: things like a reply hotkey, a collapse hotkey, better selected item highlighting, bottom comment navigation (I can't navigate to and interact with the bottom-most comments), or not having to click on an empty section after clicking somewhere else to be able to use hotkeys again (aka making them work even when comments aren't focused)

InkstainTheBat avatar Apr 22 '25 18:04 InkstainTheBat