qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

Add keyboard shortcuts to navigate paginated lists

Open cellio opened this issue 5 years ago • 3 comments

https://meta.codidact.com/questions/279114

It would be nice if on pages with several subpages (like the posts page, with the previous/next and page number bar on bottom), there would be a shortcut to go to the previous/next page in the list.

I suggest the keys h and l for this (as they are what vi uses, and the j/k seems to also mimic vi, although their function is reversed). That is, pressing h would be equivalent to choosing the “previous” button, and pressing l would be equivalent to choosing the “next” button.

As a bonus, there could also be shortcuts for the individual pages. The obvious shortcut g p is already taken, but maybe g n for “goto page number”, so that g n 1 goes to page 1 etc.

Alternatively, the shortcuts could be relative. For example, g h 5 would go 5 pages back, and g l 3 would go 3 pages forward. g h 1 would be equivalent to h, g l 1 equivalent to l.

Since going back/forward zero pages makes no sense, the shortcut g h 0 could go to the very first page, and g l 0 to the very last page.

cellio avatar Nov 17 '20 01:11 cellio

Good to think about the impact on users that aren't expecting anything to happen when they press keys on their keyboard. Should this be a toggleable feature?

Taeir avatar Jul 21 '23 14:07 Taeir

Good to think about the impact on users that aren't expecting anything to happen when they press keys on their keyboard. Should this be a toggleable feature?

If we do this only if the Keyboard Tools user preference is set, does that address the concern? Or do you think users might still be surprised by the expanded scope?

cellio avatar Jul 21 '23 14:07 cellio

I think users won't know of the feature if it is not on by default. In general it is probably not an issue, but I've had some problems on e.g. gitlab, where I was just typing something and then it's actidentally not focussed on the textbox I was typing into but rather on the page, and then it just jumps to a random page (i => new issue, etc.).

Taeir avatar Jul 21 '23 14:07 Taeir