Instructions on right and feedback on "wrong" keyboard shortcut usage

I knew about the “Keyboard Shortcuts” modal for quite some time, but honestly didn’t know how they worked. Just now, when I investigated a bit further and read some specific instruction by another user, that I first have to j/k in a topic to go through the posts before I could use e and similar, I understood the concept behind it better.

Before I tried to combine the keys with alt, ctrl, shift in a random manner and didn’t get any further. Also just hitting e when focusing a post in a topic with the mouse - and nothing happened.

I think it would be need to
a) more information on usage to the Keyboard Shortcuts modal and
b) give feedback when you press e but have to j/k first:

Select a post by using j/k first.

as a “toast” or some similar kind of notification shown temporarily to the user as feedback would be nice. Could also include a link to a more elaborate “How to use Keyboard Shortcuts” explanation.

5 Likes

I :heart: that idea. Shouldn’t be too hard to implement :wink:

3 Likes

In hindsight I know that just “hovering” above a post doesn’t “select” it (red border on the left). But back when I tried the shortcuts, I didn’t. (But maybe clicking could do the same as j/k and then e could work…)

b) could also be used to give feedback like “You can’t edit this post.” when you use j/k to navigate to a post, press e and actually can’t edit that post.

Sure that is a good idea see if you can make it so!

@nbianca can you take this? When the user press e and no post was focused using the keyboard, check if there’s a post under the cursor and open the composer on that post.

3 Likes

This is now available :clap:

https://github.com/discourse/discourse/pull/6294

4 Likes

Reopening this per:

This needs a lot more though behind it. My position here is … you are opting for keyboard pain/love, learn to use the keyboard.

2 Likes

Well sort of… the two fisted mouse + keyboard is pretty good too so I kinda disagree with you here on this one.

2 Likes

It is strongly surprising that a post that has no actual hover visual effect on it, as being selected, receives an action. If our posts turned light grey when you hovered with the mouse I would think this is more defensible but we would never do that.

Even gmail which has a hover effect does not allow you to “mute” a conversation unless you have it selected with j k.

That’s fair, then show a “no post selected” browser dialog or something simple.

1 Like

Yes I brought this up here:

https://meta.discourse.org/t/some-kind-of-notification-when-keyboard-shortcuts-do-something-off-screen/19423/2?u=sam

We need a new widget first imo, cause this is a soft, “oh no I need to close a modal now” kind of notification.

1 Like

My initial request was about the fact, that it says nowhere in the keyboard shortcuts page that you have to use [j]/[k] before being able to use [e]. I hit [e] in all combinations I could think of, but nothing happened.

So that’s what the initial feature request was: Surface that requirement, so I can learn about it somehow. Having something happen on pressing [e] was only one of two suggestions I made, the other was just adding the information to the keyboard shortcuts page.

3 Likes