sheodox / alexandrite

A beautiful and convenient desktop-first alternate web UI for Lemmy.
https://alexandrite.app
GNU Affero General Public License v3.0
234 stars 21 forks source link

Keyboard Navigation #17

Open diego-carrera opened 1 year ago

diego-carrera commented 1 year ago

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

adrianzech commented 1 year ago

Navigate to Previous and Next Post would be awesome!

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

dnet890 commented 1 year ago

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

sheodox commented 1 year ago

@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.

barelylit commented 1 year ago

+1 for me on this

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

sheodox commented 1 year ago

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.

barelylit commented 1 year ago

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

sheodox commented 1 year ago

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!

barelylit commented 1 year ago

Dont seem to be working here on Brave or Chrome,

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

sheodox commented 1 year ago

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

sheodox commented 1 year ago

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.

barelylit commented 1 year ago

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 commented 1 year ago

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

barelylit commented 1 year ago

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

Kommynct commented 7 months ago

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.