Topic: [Feature] Keyboard shortcut/gesture support for site navigation/interaction

Posted under Site Bug Reports & Feature Requests

Requested feature overview description.

I'd like to interact with the site using keyboard shortcuts where a keyboard is available, or using gestures like swipes on things with capacitive-touch screens.

Why would it be useful?

It's better to provide focused real-world use-cases rather than hand-wavily hypothesize about "all the possibilities", so I'll just give the example I really wish already existed.

Imagine being able to page through posts in a pool by using (for example) P and N, or maybe H and L, or maybe and . Alternatively, wouldn't it be cool to be able to (also for example) two-finger swipe left and right?

What part(s) of the site page(s) are affected?

Scoped just to the example given above, all pool pages.

A canonical answer to the more generalized form of this question, would be to implement a ? shortcut that brings up a help screen showing what shortcuts work for the page the user is on, and then make this shortcut key work "just about everywhere" so people can discover functionality for themselves.

How easily/quickly could this be implemented?

  • Keypress detection in JavaScript was a just-about-solved problem ten years ago, and a definitely-solved problem today. A lot of technically-oriented websites (Gmail, GitHub, Stackoverflow are three I can think of right now, and I KNOW I'm forgetting a bunch more) use keyboard shortcuts. There is more than enough precedent to give e621 a hard time for not getting with the times here :P
  • If the alternative of using Alt+N and Alt+P (or, on macOS, CTRL+⌥Opt+N and CTRL+⌥Opt+P) is acceptable, simple keyboard shortcut functionality can be added with 14 characters of HTML (per shortcut) that doesn't require JavaScript to be enabled by turning <a href="/post/show/...">Next</a> into <a href="/post/show/..." accesskey="n">Next</a>. HTML accesskey support has existed for nearly 20 years (...wow).
  • It would seem multi-touch in HTML5 is not widely emphasized/advertised, but is mature and stable, as noted in https://www.html5rocks.com/en/mobile/touch/ which talks about what was possible 8 years ago! The key significant thing here is that simple gesture detection (touchList has two elements, OK; you moved generally rightwards within half a second, OK) is significantly easier/less headache-prone than coordinating bits of a webpage with touch input.
  • 1